Ngrok – Demo Web and Mobile Apps Without Deploying Them

How to show demo?

Before we know what is ngrok lets understand the problem first. As web application developer, we always face issue in demo. Most of the time developer works on local machine. But how to give demo to remote client. For that either we have to do screen sharing on Skype or team viewer.

Skype                TeamViewer

But its not always good experience. Sometime if connectivity is not good, screen will be blurred. Remote user will not have good and real experience. Other option is to deploy on web server but it’s not always feasible for web developers. Most of the time developers don’t have the remote server so how to do it?

Here comes ngrok, the secure tunnels to localhost You can check product here on their website. Click here

What is ngrok?

ngrok creates an secure tunnel to your local host and make it accessible to outside world.

Let me give you one simple example. For example if your local server is running it should be on http://127.0.0.1 and if it’s running on default port it’s port 80 or it could be your own custom port.

Now if you have installed ngrok, you can start deamon on particular port and it will give you one URL which you can give it to remote user. When they run it in browser, they will see your local web server. So when they run it request goes to ngrokcloud and it will forward it to your localhost server.

ngrok demo

(Pic courtesy : product website)

Quick Demo

Lets see things in action quickly. For example I have a web application running in my local MAMP server.

Local Server

Now I want to show it to my remote client. For that I have installed ngrok and started it’s deamon to point to 8888 port.  For this download and install it from ngrok website. Now run command in terminal

ngrok http 8888

It will start ngrok tunnel and will give you URL. In your case if you are using server without custom port then port no will be 80 or use your own port.

ngrok

As you can see in above picture it gave you URL which you can share to remote users for demo and when they run it in browser they will see your local website. Check the URL in below screenshot.

ngrok demo

That’s how it’s easy to show demo without deploying your web app or mobile app to server.

Leave a Reply

Your email address will not be published. Required fields are marked *