Learning a new programming language is as fun as it is challenging. You’ve probably used all sorts of techniques to learn from quickstarts to cloning to banging your head against a manual. If I may butcher the English language – It’s frunstrating (fun + frustrating).

Alan Shreve wanted to learn a new programming language – Go. At the end of his foray into Go he had invented a development tool that tens of thousands of developers use today. This is the story of how Alan Shreve built ngrok.

A Day In The Life of An HTTP Request

I could go my whole life without ever hearing the words “an application error has occurred.” When Alan heard those words, he realized he was completely taking himself out of the development flow, just to make an HTTP request to Twilio.

“I realized I am starting an audio/signaling connection to a cellular tower and it’s being transmitted over the PSTN through multiple providers, into Twilio’s data center which is making an HTTP request to my tunnel services, and then sending it through to my local service. That’s a really, really expensive HTTP request.”

Now he can easily replay HTTP requests and avoid hearing those five words using the tool he built himself.

You give ngrok the port your app is running on, it gives you a hexadecimal address. You paste that address into your Twilio Request URL and you’re good to go. Let the app testing begin. ngrok lets Alan look at all the parameters of the HTTP request without having to press dial again.

It’s so easy that I can show you how to respond to a text using Twilio and ngrok in a few lines of code.



Twilio and ngrok in 5 lines of code

Create an XML file called ngrokmessage.xml with the following code: