Sep 17, 2018

How to run http server in Python

# Python 2

python -m SimpleHTTPServer

# Python 3

python3 -m http.server

The above command opens a server on the default port, which is 8000.
You can pass a custom port number as the last argument to the command above.