bookmark_borderHow to access localhost to public url without static IP address

I have worked for a project where I have to show the demo but unfortunately there is no staging server from client side. So we have plan to setup a server from our local system using static IP Address.

It was worked fine until power on or internet on or static IP works fine, So we switched over the staging server to AWS environment. After the completion of the project I have done few research to resolve this type of issue. I found the Ngrok tool where we can setup our localhost and port to Ngrok cloud service and share the Ngrok URL.

Ngrok Homepage
Ngrok Homepage

How it works

You need to download the tool from the https://ngrok.com/download URL, unzip and execute the command.

ngrok http 80

Ngrok http 80
Ngrok http 80
Ngrok http 80 started
Ngrok http 80 started

This connect your 80 port with Ngrok cloud service which accepts the traffic on a public address and relays that traffic through to the ngrok
process running on your system and then on to the local address you specified.

Ngrok forwarding address
Ngrok forwarding address

Listing the http request from Ngrok from command.

Ngrok http 80 list http request
Ngrok http 80 list http request

Display the static file content from the Ngrok.

Ngrok forwarding address static file
Ngrok forwarding address static file

How it’s help for the development

Show the demo without deploying the project
Building webhook consumers on your dev machine
Testing mobile apps connected to your locally running backend
Stable addresses for your connected devices that are deployed in the field
Running personal cloud services from your home

Also if you in free plan Ngrok Forward URL change every time whenever you restart the Ngrok. You can also monitor the tool using http://localhost:4040 default port from your local machine.

Ngrok monitor from browser
Ngrok monitor from browser

If you have any feedback leave your comments.