Skip to content

Instantly share code, notes, and snippets.

@cristianrubioa
Created July 10, 2020 08:03
Show Gist options
  • Save cristianrubioa/72a8e0002fcf9dfd22a0862e5890d8b1 to your computer and use it in GitHub Desktop.
Save cristianrubioa/72a8e0002fcf9dfd22a0862e5890d8b1 to your computer and use it in GitHub Desktop.
Simple http server with Python
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