Quickly serve a folder via Web Server
A short one liner to quickly serve any folder via a http server.
cd to the directory you want to serve.
At the shell prompt enter
python -m SimpleHTTPServer
When run the command will output the port which the server is available on. You can optionally provide a port number e.g.
python -m SimpleHTTPServer 8080to set this yourself. You can only serve a single folder at each port.
Open your web browser and access
If the server is running on port :80 you can omit it from the address. If you set the port number yourself access via
http://localhost:8080changing 8080 to the port number you picked.
- Syntax highlighting with Django and Markdown
- Remove duplicate lines from text files (with sort)
- Pathomx: Example Analysis
- cx_Freeze and PySide on Mac
Get my latest Python projects, tips & tutorials direct to your Inbox.