Last Updated: February 25, 2016
·
2.647K
· nosuid

Python one line HTTP server

Simply run the following command from the root directory you want to start using as root:

$ python -m SimpleHTTPServer

Go to http://localhost:8000 to start browsing.

You can pass as second parameter a different port if you do not want to use the default one.

$ python -m SimpleHTTPServer 8080

Use Ctrl-C to stop the server