Running a simple HTTP server
suggest changepython -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.
Found a mistake? Have a question or improvement idea?
Let me know.
Table Of Contents