I used to believe that we can't host an app locally and serve it to the world, as easily as we do with Heroku or Netlify. Until I found this NGROK. With ngrok we can still get a public URL like the URL we get after hosting our app with Netlify or Heroku.
Very briefly, ngrok exposes local servers to the public internet. More on how it works.
Where all the places we can use.
When doing development locally, we need public URLs for testing certain things like,
- Exposing local web servers.
- A webhook URL.
- Will need redirect_url for OAuth.
These are few things, I used ngrok for. You can check more use cases from here. WHAT IT'S GOOD FOR
To get started with ngrok.
- Download
- Navigate to terminal and hit the command
ngrok http <port_number>
There you go, now your localhost will be assigned a public url. Which you can share with anyone in the world, to use your app. On the free plan, ngrok's URLs are randomly generated and temporary. If you want to use the same URL every time, you need to upgrade to a paid plan.
Few more good things about ngrok, which I used.
- Inspecting traffic.
- Replaying request.
This is just a kick-start guide for beginners with ngrok. This is my very basic understanding after a couple of days of usage. Please go through the docs to learn more.


Top comments (0)