Hacker News new | ask | show | jobs
by manojlds 5303 days ago
Who really uses SimpleHTTPServer in production or for serious work?
4 comments

  python3 -m http.server 8080
is a useful one-liner to serve a directory over http. There's no good reason to have it in the standard library — mapping directories to html listings and http paths to filesystem paths is a bit idiosyncratic — but now that it's there I'm happy to use it.
I've found it useful as a basis for handling HTTP requests in a test framework I'm working on. Not for testing HTTP, mind you, just as an adjunct for other tests. The 'one header line per packet' responses are a little idiosyncratic though!
In my short time as a professional developer I have learned to never doubt the silly things people do sometimes (including me)
Not that I have seen it, but if it works, it ain't stupid.