Sometimes we need to fire our development project end-point(localhost) from outside. Especially when you need to fire a webhook from a third-party system. Most of the case the third party system are not able to communicate with localhost.

In that case, you can easily create a random hostname using ngrok or localtunnel. I already used ngrok in windows system. Here I am trying to share how to do it. Steps to do it.

  • Download the ngrok exe from here.
  • Unzip the folder and open the command prompt from that folder.
  • Run the command ngrok http [port] -host-header="localhost:[port]". replace “[port]” with your project running port. example ngrok http 53083 -host-header="localhost:53083".
  • You will see a new prompt like below
Command Prompt of ngrok
  • Then you can use the forwading url or that you see on the screen.
  • You can also see an UI at browser going to (Web Interface). UI will be someting like below. Which record all the request information.
Web Interface of ngrok

Leave a Reply

Your email address will not be published. Required fields are marked *