One Line Python HTTP Server

Python 2.x:

python -m SimpleHTTPServer

Python 3.x:

python -m http.server

 

Specify a custom port:

Python 2.x:

python -m SimpleHTTPServer 8080

Python 3.x:

python -m http.server 8080

 

Top