Quickly serve static files in a directory

Oct 14, 2024    #python   #http-server  

Some time you may want to quickly serve a directory with http. May be to preview some html, or file sharing in local network.

python -m http.server

You can config port and directory:

python -m http.server 3000 --directory some/path

Or use HTTP/1.1 protocol

HTTP/2.0 is not supported.

python -m http.server 3000 --protocol HTTP/1.1


Next: Debian on Android