Python3: http.server
Revision as of 10:22, 24 November 2018 by Onnowpurbo (talk | contribs) (Created page with " import http.server import socketserver PORT = 8000 Handler = http.server.SimpleHTTPRequestHandler with socketserver.TCPServer(("", PORT), Handler) as httpd:...")
import http.server import socketserver PORT = 8000 Handler = http.server.SimpleHTTPRequestHandler with socketserver.TCPServer(("", PORT), Handler) as httpd: print("serving at port", PORT) httpd.serve_forever()
Run
python -m http.server 8000 python -m http.server 8000 --bind 127.0.0.1 python -m http.server --directory /tmp/