python3 http server command line



How to serve static files with python3

In this short tutorial, we explain how to start a very small http server that can be useful to share files across the network. Don't use this for production!

Open your favorite terminal and execute:

python -m http.server 8000

The previous command will start a http server on port 8000 on the directory that you executed the command. Just open with the browser on http://localhost:8000 (or your network ip address).