Contents

[http.server] Run a python http server from the command line

0
Contents

Sometimes you just need to quickly serve some files over http from the command line. The http.server allows you to do this.

python -m http.server 8000

# bind to a specific IP
python -m http.server 8000 --bind 127.0.0.1

Reference: http.server docs