Open ivywze opened 5 years ago
SimpleHTTPServer
input:
$ cd 👉[path to working folder here] $ python -m SimpleHTTPServer
output:
Serving HTTP on 0.0.0.0 port 8000 ...
Open browser and input:
http://localhost:8000
Find Terminal on the navigation bar and open new terminal.
Follow the steps above, no need to change direction at this time.
corresponding input change to: python -m SimpleHTTPServer 8080
python -m SimpleHTTPServer 8080
corresponding input change to: python3 -m http.server or python -m http.server
python3 -m http.server
python -m http.server
SimpleHTTPServer is not recommended for production. It only implements basic security checks.
Use
SimpleHTTPServer
for request handler in Terminal.local Terminal
input:
output:
Open browser and input:
VS code
Find Terminal on the navigation bar and open new terminal.
Follow the steps above, no need to change direction at this time.
change port
corresponding input change to:
python -m SimpleHTTPServer 8080
For python3
corresponding input change to:
python3 -m http.server
orpython -m http.server
Warning
SimpleHTTPServer
is not recommended for production. It only implements basic security checks.