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. 😉

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 🙂