Skip to content

Instantly share code, notes, and snippets.

@pwittchen
Created July 24, 2020 13:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pwittchen/d373422df0055cc23cadf317a6732ad5 to your computer and use it in GitHub Desktop.
Save pwittchen/d373422df0055cc23cadf317a6732ad5 to your computer and use it in GitHub Desktop.
dummy python server
from http.server import BaseHTTPRequestHandler, HTTPServer
host="localhost" ; port=8080
class HTTPRequestHandler(BaseHTTPRequestHandler):
def do_GET(self):
self.send_response(200) ; self.end_headers() ; self.wfile.write(b'ok')
print("http server is running at " + host + ":" + str(port))
HTTPServer((host, port), HTTPRequestHandler).serve_forever()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment