How to use ngrok for react

Ngrok is very usefull for preview, or testing or just in development. It’s tool to creates a secure tunnel on your local machine along with a public URL you can use for browsing your local site. The set up is very easy too.

Without ngrok you can access webserver too but only within the same network using:

Download ngrok client here and unzip the file. Then generate your auth token and run

./ngrok authtoken <YOUR_AUTH_TOKEN>

After that, you can start your react app as normal. Then, run

./ngrok http 3000

on where you unzip the ngrok file. We use port 3000 as it is react default port. Tadaaaa your done:



Love podcasts or audiobooks? Learn on the go with our new app.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store