in python ~ read.

Ad-hoc Webserver

Everybody who's using Python for some time knows about the SimpleHTTPServer module and its ability to act as an ad-hoc webserver:

$> python2 -m SimpleHTTPServer 8080
Serving HTTP on 0.0.0.0 port 8080 ...

Since we are all moving onwards to Python 3, this is how to do it after SimpleHTTPServer has been merged into http.server in Python 3:

$> python3 -m http.server 8080
Serving HTTP on 0.0.0.0 port 8080 ...

Have fun :-)

comments powered by Disqus