EDDYMENS

Last updated 2023-08-06 22:50:43

How-to-start-a-python-http-server

You can start a simple [Python]() HTTP server using the SimpleHTTPServer or http.server modules for Python 2.x and Python 3.x respectively.

This allows you to serve HTML files more easily.

Python 2

$ python -m SimpleHTTPServer 9000

Python 3

$ python3 -m http.server

The above will both start a server on port 9000

Here is another article you might like 😊 "Diary Of Insights: A Documentation Of My Discoveries"