Today, I Learned...

by Justin Campbell

< All

Use python -m SimpleHTTPServer to start a static web server in the current directory:

$ touch data.txt
$ python -m SimpleHTTPServer
Serving HTTP on 0.0.0.0 port 8000 ...
1.0.0.127.in-addr.arpa - - [12/Oct/2012 16:24:11] "GET / HTTP/1.1" 200 -
1.0.0.127.in-addr.arpa - - [12/Oct/2012 16:24:11] code 404, message File not found
1.0.0.127.in-addr.arpa - - [12/Oct/2012 16:24:11] "GET /favicon.ico HTTP/1.1" 404 -
1.0.0.127.in-addr.arpa - - [12/Oct/2012 16:24:46] "GET /data.txt HTTP/1.1" 200 -

via @matshaffer

October 12th, 2012