Python never ceases to amaze me. Here is how to run a quick web server using Python from the command line:
unknownc8e0eb148153:D3 christopherspears$ python -m SimpleHTTPServer
Serving HTTP on 0.0.0.0 port 8000 ...
127.0.0.1 - - [10/Jan/2014 10:53:35] "GET / HTTP/1.1" 200 -
127.0.0.1 - - [10/Jan/2014 10:53:36] "GET /data.tsv HTTP/1.1" 200 -
127.0.0.1 - - [10/Jan/2014 10:53:47] "GET / HTTP/1.1" 200 -
127.0.0.1 - - [10/Jan/2014 10:53:47] "GET /data.tsv HTTP/1.1" 200 -
127.0.0.1 - - [10/Jan/2014 10:54:13] "GET / HTTP/1.1" 200 -
As you can see, the server is serving up the data.tsv file in the directory. Here are some helpful links:
http://www.linuxjournal.com/content/tech-tip-really-simple-http-server-python
http://stackoverflow.com/questions/12647196/how-do-i-shut-down-a-python-simplehttpserver
No comments:
Post a Comment