DEV Community

Jose Antonio Felix
Jose Antonio Felix

Posted on

How to expose LocalHost to internet ? Easy way 📶

Have you ever wanted to show to your friends your awesome web page, API, etc. But you found that this project is running on localhost? 🤔

Well, there is a way to expose this localhost to the internet and get an https URL easy and for free 😎

For this we can use this app:

Ngrok

Ngrok give you the ability to expose a specific port of your localhost and share an http/https URL to your friends.

How to use

1.- Download Ngrok here and open it

2.- When you open first time the ngrok.exe it will be installed automaticaly, for use it you have to open a command prompt and type:
ngrok http PORT

in example, if we want to expose a web page and its server is running on port 8080, we will type:
ngrok http 8080
command prompt ngrok command
So when we run this command, we will get this:
Ngrok running process

That means we can copy this new URL and paste it on our browser and we could access to our page/api/etc from every pc, as if we were on localhost 😎.

We'll have 2 hours to expose our localhost, but don't worry, when this time get's over, we can re-run ngrok command and it will work again!!

If you liked this tutorial like it and follow me if you want! Thank you for reading

Top comments (4)

Collapse
 
adal profile image
Adalberto Prado

Im in love with ngrok!
It was very useful in a freelancing project with a friend 😎

Collapse
 
jafb321 profile image
Jose Antonio Felix

Wow, It's awesome! Ngrok is cool 😎 :adaldev:

Collapse
 
arturo profile image
Arturo

Amazing!

Collapse
 
jafb321 profile image
Jose Antonio Felix

🤍👌