Created
July 10, 2020 08:03
-
-
Save cristianrubioa/72a8e0002fcf9dfd22a0862e5890d8b1 to your computer and use it in GitHub Desktop.
Simple http server with Python
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
import http.server | |
import socketserver | |
PORT = 8081 | |
Handler = http.server.SimpleHTTPRequestHandler | |
with socketserver.TCPServer(("", PORT), Handler) as httpd: | |
print("serving at port", PORT) | |
httpd.serve_forever() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment