Created
June 1, 2020 17:11
-
-
Save zdxerr/7fa9182a5457205eca748d11c940cdad to your computer and use it in GitHub Desktop.
Python ThreadingHTTPServer Example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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