Last Updated: February 25, 2016
·
458
· aschlapsi

Need a local web server for development? Use Python!

Some days ago I wanted to research how to integrate Dropbox into a simple web page, but the authentication process works only from a page which was served by a web server. So I simply typed the following line from the directory where my web page resides and I had a local web server running on port 8000.

python -m SimpleHTTPServer

You can add an argument for the port:

python -m SimpleHTTPServer 8080

Don't use this for production!