2-Cent Tips
2-cent Tip: 'Serve' your current directory
Amit Saha [amitsaha.in at gmail.com]
Thu, 2 Apr 2009 14:57:59 +0530
Hello all,
Perhaps this is too simple to be a 2c-tip, but still a tip.
The following script (either run by hand) or in a script starts up a HTTP server and makes available all the files and directories from which it is started, so as to make them available over the network:
python -m SimpleHTTPServer &
By default, it starts off the server on '8000' but that can be changed using:
python -m SimpleHTTPServer 9090, which starts the server on 9090, and can be accessed via the browser or any HTTP client using:
firefox https://127.0.0.1:8000/
More on the Python module at https://docs.python.org/library/simplehttpserver.html
Thanks, Amit
-- https://amitksaha.blogspot.com https://amitsaha.in.googlepages.com/ *Bangalore Open Java Users Group*:https:www.bojug.in "Recursion is the basic iteration mechanism in Scheme" --- https://c2.com/cgi/wiki?TailRecursion
[ Thread continues here (7 messages/8.60kB) ]