Simple HTTP server with Python

Simply run this from the command line and it will server the content of the current directory:

python -m SimpleHTTPServer 80

I recommend setting an alias for that and make sure that the port is always open from the internet. It makes it very easy to share stuff with friends temporarily.

Python 3

SimpleHTTPServer is gone in Python 3.

You can now use:

python3 -m http.server 8000

Thanks for reading this post!

If you found an issue in this article, you can create an issue on Github.

If you have a comment or question, please drop me a line below!