Search code examples
xampptwiliongrokxlm

how to use ngrok without xampp


i am trying to make twilio messaging system and for that i need public url so in some tutorial i heard about ngrok. but they are using xampp with xml for localhost but i do not want to use it for some reasons. so how can i use ngrok with xml but without Xampp? or even is that possible? this is code i want to put in XML

<Response>
  <Message>Hello</Message>
</Response>

here is link of the twilio-message tutorial


Solution

  • Twilio developer evangelist here.

    There's no need to use ngrok with any other framework or tool. ngrok is a way to create a public URL that tunnels traffic down to an application server running on localhost. The page you link to makes no mention of XAMPP.

    You can serve static XML over ngrok, you just need a web server to serve it on localhost. You can also serve the XML from something like an Express application, or whatever you want.

    For deploying to production, you don't even want to use ngrok, as that is a tool for tunnelling to your localhost. You can either host your XML anywhere staticly online, or run a web server with an application to generate it or even use something like Twilio Functions to run Node.js code to generate your XML.

    It's mostly up to you how you produce your XML, ngrok is just one tool that helps you test your webhook applications locally.