2

Every once in a while when I'm debugging some web app, it would be useful for me to be able to serve a folder via a lightweight HTTP server. Something along the lines of

cd folder
httpserve -p 5000

in order to serve that folder over port 5000. Is there any tool to allow me to do this?

Thanks.

2
  • Which operating system? Aug 17, 2010 at 21:12
  • I'm on a Mac, the Python thing from ax25 seems to work great for me.
    – wxs
    Aug 17, 2010 at 21:25

1 Answer 1

4

python -m SimpleHTTPServer 5000

Or for cgi serving:

python -m CGIHTTPServer 5000

and browse to : http://localhost:5000/myscript.py

1
  • You are welcome. Glad to have one to answer!
    – ax25
    Aug 20, 2010 at 20:13

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .