Start a simple web server anywhere using python

Python has a builtin web server which is great for development environments and can be started anywhere on your computer with 1 simple command.

Examples below are given for Python2.x and Python 3.x and will start the server on port 80.

Python 3:
python3 -m http.server 80 

Python 2:
python -m SimpleHTTPServer 80 

Simply close the terminal window or press CTRL+C to shut down the server.

Was this post helpful?
Yes
No
Powered by Devhats

Leave a Reply

Your email address will not be published. Required fields are marked *