Running a simple HTTP server

suggest change
python -m http.server 9000

Running this command serves the files of the current directory at port 9000.

If no port number is given, the server runs on the default port 8000.

The -m flag searches sys.path for the named module and runs it.

To listen only on the loopback interface, add --bind 127.0.0.1. The built-in server is suitable for development and trusted local networks, not production deployment.

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:



Table Of Contents