ngrok Rocks!

Earlier this week we had an inner hackathon here at BigPanda.
At some point, my team needed a way to expose our local web server and build webhook integrations.

I’ve heard about ngrok before and this seemed like a good opportunity to give it a try.

Disclaimer: this is not a deep dive, only a basic intro not covering the advanced and paid features.

Installation

  1. Download the binary from here
  2. unzip it
    $ unzip /path/to/ngrok.zip

Bonus tip - move the executable to a folder in your $PATH

Usage

Say we’re running our local web server on port 8787.

Typing:

$ ./ngrok http 8787

will result in ngrok listening on port 8787 and creates the secure tunnel.

ngrok listens to port 8787

Just use one of the two sets of publicly available URLs that map to your local web server

Forwarding http://86ddc8c6.ngrok.io -> localhost:8787
Forwarding https://86ddc8c6.ngrok.io -> localhost:8787

If this isn’t awesome enough, ngrok also has a dashboard!
Go to http://127.0.0.1:4040 where you can:

  1. Look at your tunnel status - requests coming in and responses from your web server
  2. replay requests, especially useful for debugging

Bonus

Secure your tunnels:

$ ngrok http -auth "user:password" 8787

ngrok has lots more cool features like using custom subdomains and auto-launching from a configurations file.

It really rocks \m/

rocks!

Read more in the official docs

comments powered by Disqus