Start a Python HTTP Server
Ever wanted to quickly share a file over a network? Go to the directory which you want to serve over the network and write the following Python code in your terminal.
Python: 3.0    Anurag Rana    06 Sep 2021   0
Login to upvote
1
2
3
4
5
6
# this will start the simple web server in the current directory
# Python 2
python -m SimpleHTTPServer

# Python 3
python -m http.server
Copy | Download as: .py file   PNG
Share on: FB   Twitter   LinkedIn   WA
©2021 - code108labs   Contributors   Hosted on DigitalOcean   Partner website: pythoncircle.com