Mon 8 Jan 2007
Simple webserver for cheap.
Posted by wari under Cool Tips, Programming, Web
View Comments
If you need to provide a directory to serve just for demo sake, or allow people to briefly be able to download files from your system, and you have python with you (Linux or Mac OS X, Windows will need a separate download). You just need to go the the directory you want to serve, type in the one liner in the command line “python -c 'import SimpleHTTPServer; SimpleHTTPServer.test()'” and proceed to http://localhost:8000/ and your webserver is ready to do your bidding.

Tip thanks to tekNico (or Nicola Larosa), deep in the bowels of the fortunes page where it reads:
Instant web server: 1) cd /directory/to/be/published 2) python -c 'import SimpleHTTPServer; SimpleHTTPServer.test()' 3) point your browser to http://localhost:8000/ 4) Profit. :^) -- N. Larosa
No related posts.
Related posts brought to you by Yet Another Related Posts Plugin.
-
Nicola Larosa