-->

How to expose local development server to the world

7 years ago

Powerful tools exist to expose local services. Learn how easily you can expose server from your local development machine to the world witho...

Powerful tools exist to expose local services. Learn how easily you can expose server from your local development machine to the world without deploying code to the external server. How to expose local development server to the world.


Secure tunnels to localhost


Ngrok is the most popular service of all these. ngrok allows you to create a secure public URL (https://xxx.ngrok.io) to a local web server on your machine. Let’s see how it works in action.


For testing purposes, I’ve created a really simple web server using express:


//clone github repo here


Run node server on your terminal


$ node app.js

When the server is up and running on http://localhost:8181 and you do a request to /iampublic you should get a message Hello World now visible public to the world :)’


Time to setup ngrok. 1f609


Don’t worry is very simple and this is what you need to do:


Install ngrok


$ npm install -g ngrok

Expose your local web server to the world


$ ngrok http 8181

Let’s test it out..


$ curl http://e25e8427.ngrok.io/iampublic

Yes it’s so damm easy 1f642


Looks like our local development server is accessible from the rest of world!ngrok-image










I hope you found this guide interesting.


Thanks for reading.


If you liked this article, then please subscribe to my YouTube Channel for video tutorials.


You can also find me on Twitter and Facebook.


Check out


Node.JS-Intro

Node.js and NPM

Installing node.js on OSX – macOS Sierra











No comments: