How to test ssl on localhost and influence people

So you've got a server running on localhost, and you need to make sure it works on SSL before pushing up to your staging server. What do you do?

Enter ngrok: an extremely useful tool for Mac, Windows, and Linux that securely creates a tunnel from the internet to a designated port on your local machine.

Let's say you're running a server at http://localhost:8080. After installing ngrok, all you'd need to do is this:

$ ngrok 8080

And you'd get something like this: -> ->

Those urls are accessible anywhere on the internet. Pretty sweet, right?

Some other things I use ngrok for:

  • Testing webhooks
  • Testing on a mobile device
  • Temporarily sharing a demo

You can read more in the documentation. Happy tunnelling!