DEV Community

Cover image for Access your localhost from anywhere with NGROK!
Rudra Pratap
Rudra Pratap

Posted on • Updated on

Access your localhost from anywhere with NGROK!

When you make apps be it Nodejs or React, you use localhost server to see your development progress in realtime.

Now suppose you have a remote team (or a friend) with which you want to share your progress in realtime. How would you do?

You will probably use Google Meet or any screen sharing service to show your work. But this is not efficient because they can't access your localhost because it is not publicly available.

And if you are thinking that you will host the app on a web hosting service, make it live and then share the public url, then my friend it is very inefficient and time consuming.

In this article, I will share a wonderful tool you can use to achieve this purpose.


NGROK

Image description

NGROK is a tool used to tunnel your localhost to a live url.

Steps:

  • Go to ngrok.com and signup. After registering you will get a auth token.
  • Download the zip file for your respective OS.

Image description

  • Unzip the file and run the executable

Image description

  • Type the following command (replace token with yours)

Image description

  • To start a HTTP tunnel forwarding to your local port 80, run this next (replace the port number with the port of your localhost on which your app is listening):

Image description

  • You will get a url which can be opened from anywhere and the url will show the web page served by your localhost server.

Top comments (0)