Skip to content

Instantly share code, notes, and snippets.

@zdxerr
Created June 1, 2020 17:11
Show Gist options
  • Save zdxerr/7fa9182a5457205eca748d11c940cdad to your computer and use it in GitHub Desktop.
Save zdxerr/7fa9182a5457205eca748d11c940cdad to your computer and use it in GitHub Desktop.
Python ThreadingHTTPServer Example
from http.server import ThreadingHTTPServer, SimpleHTTPRequestHandler
def run(server_class=ThreadingHTTPServer, handler_class=SimpleHTTPRequestHandler):
server_address = ('', 80)
httpd = server_class(server_address, handler_class)
httpd.serve_forever()
if __name__ == "__main__":
run()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment