Skip to content
loading...

Create a Quick Local Web Server with Python and Ngrok

Scott McAllister on May 12, 2019

One of the nice things about starting a new job is that you have to setup all of your development tools and environments from scratch. And some of ... [Read Full]
markdown guide
 

If you're using Homebrew, a good ol' fashion brew install ngrok should work if you don't want to download and move things.

And for others who might be using PHP regularly, you can also use PHP's built in local server in a directory using php -S localhost:3000

Great tips!

 

This is great!

If you want even quicker access to tunnels alongside like direct access to the ngrok API and all its features through Python, check out pyngrok: pyngrok.readthedocs.io/en/latest/ Full disclosure, I am its developer. Hope others also find it useful!

 
 

I didn't feel qualified to answer,so I forwarded your question to Twitter, and got the following response that made a lot of sense.

twitter.com/cybeehive/status/11284...

 

hey thanks for the link Scott, appreciate it

 

What is the advantage to use python instead of apache server, if any?

 

Honestly, just presenting it as a quick alternative for development. I found it easier to just run the Python SimpleHTTPServer from the directory I wanted to serve up, rather than remembering how to configure Apache and where to put all my files for Apache to serve them up. But, if you're familiar with Apache, and already have that configured, I'd go with that.

Thanks for the question, and for reading my article!

code of conduct - report abuse