Dennis Zheleznyak

Dennis Zheleznyak

DevOps Engineer bigpanda

© 2021

Expose your local server to the world => ngrok

If you are not familiar with ngrok … BEHOLD !

Basically it’s a small utility that exposes your local server to the outside world by providing you a public address.

All you have to do is run the command:

ngrok <proto> <port>
e.g
ngrok http 4231

Output:

Session Status                online                                                                                                                                              
Session Expires               7 hours, 59 minutes                                                                                                                                 
Version                       2.3.35                                                                                                                                              
Region                        United States (us)                                                                                                                                  
Web Interface                 http://127.0.0.1:4040                                                                                                                               
Forwarding                    http://37718a48.ngrok.io -> http://localhost:4231                                                                                                   
Forwarding                    https://37718a48.ngrok.io -> http://localhost:4231                                                                                                  
Connections                   ttl     opn     rt1     rt5     p50     p90                                                                                                         
                              0       0       0.00    0.00    0.00    0.00                                                                                                        

In this example, I expose aNodeJS app on my laptop to the outside world.

That way Github can send me a notification(to http://37718a48.ngrok.io) through the repos web hook once a PR was approved.

You can download it from:

https://ngrok.com

OR simply install it on your mac:

brew cask install ngrok