Instant Web Server. When I need to serve up a few files for friends or try out some CGIs, XML-RPC, etc. I generally just fire up the PythonCard webserver sample. However, I find the following single line at a command prompt to be quite appealing for an instant web server. python -c '__import__("SimpleHTTPServer").test()'
It works on any OS where you have Python installed and since you can
cd (change directory) to the dir you want to serve files from before
running the command you don't have to mess with config files or moving
files before serving them up. If you alias the command or make a batch
file you won't have to remember the whole line. Here's an example run
on my Mac. [solo:~/Documents] altis% python -c '__import__("SimpleHTTPServer").test()'
Serving HTTP on 0.0.0.0 port 8000 ...
localhost - - [14/Mar/2004 09:27:09] "GET / HTTP/1.1" 200 -
localhost - - [14/Mar/2004 09:27:28] "GET /gingerbread.py HTTP/1.1" 200 -
[via insom.me.uk] [Kevin Altis' Weblog]
3:07:24 PM Google It!.
|