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.

wxs
  • 185
  • 1
  • 6

1 Answers1

4

python -m SimpleHTTPServer 5000

Or for cgi serving:

python -m CGIHTTPServer 5000

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

Mark Henderson
  • 68,316
  • 31
  • 175
  • 255
ax25
  • 231
  • 1
  • 2