Ngrok is a tool being used for publishing local server to internet. There are many benefits of this tool such as testing local environment on real device, giving https over http for local host. See more info and installation (https://ngrok.com/)
First thing first, download the tool from https://ngrok.com/download (it’s free)
Extract to somewhere, in my case, I dropped on
C:\ngrok
Then, try this on Terminal.
ngrok
It will show
If command does not be recognized, you must add path
c:\ngrok
to system environment variables (see: https://www.computerhope.com/issues/ch000549.htm)
So let us begin in a scenario
If you are running a local host for example http://localhost:5001 and you want to publish your localhost over internet.
ngrok http 5001 --host-header="localhost:5001"
The NgRok will give you many of utilized URL as
ngrok by @inconshreveable (Ctrl+C to quit) Session Status online Account chutipong roobklom (Plan: Free) Version 2.3.35 Region United States (us) Web Interface http://127.0.0.1:4040 Forwarding http://8a2c1764ef87.ngrok.io -> http://localhost:5001 Forwarding https://8a2c1764ef87.ngrok.io -> http://localhost:5001 Connections ttl opn rt1 rt5 p50 p90 0 0 0.00 0.00 0.00 0.00