This discussion reminded me to check in something I've been having in my tree for a few weeks now; A simple HTTP server available as a standalone (-x) tool. The code is 90% written by Per. I just toolified it.
% pike -x httpserver --version Pike httpserver 7.8.337 % pike -x httpserver --help Usage: httpserver [flags] [port] Starts a simple HTTP server on port 8080 unless another port is specified. The server will present the contents of the current directory and it's children to the world without and authentication.
--version print version information and exit --help display this help and exit % pike -x httpserver Listening on 8080
The idea is taken from Python, as far as that one of my colleagues asked if Pike can do the equivalent of "python -m SimpleHTTPServer". I haven't actually checked out the python code referenced, so I don't know if -x httpserver is feature equivalent.
I find it quite handy for transferring files now and then now that I have it.
/ Peter Bortas
Previous text:
17856137 2009-08-19 22:11 /13 lines/ Brevbäraren Recipients: Pike (-) importmöte för mailinglistan Comment to 17855679 Subject: Re: Suggestions for a small menu-driven system?
Martin Nilsson (Opera Mini - AFK!) @ Pike (-) importm?te f?r mailinglistan wrote:
And that that webserver is good enough to be used for several commercial products at Opera.
Any snippets of sample code you (or anyone else) can share for a minimal server serving some (e.g. html and gifs) files from the filesystem? -- Sincerely, Stephen R. van den Berg. Currently unemployed programmer: "What do you mean, I can't initialize things in an assert()?"
(17856137) /Brevbäraren/--------------------------------------------
pike-devel@lists.lysator.liu.se