httpservertest.py 219 B

12345678910
  1. import http.server
  2. import socketserver
  3. PORT = 80
  4. Handler = http.server.SimpleHTTPRequestHandler
  5. with socketserver.TCPServer(("", PORT), Handler) as httpd:
  6. print("serving at port", PORT)
  7. httpd.serve_forever()