Created
July 24, 2020 13:27
-
-
Save pwittchen/d373422df0055cc23cadf317a6732ad5 to your computer and use it in GitHub Desktop.
dummy python server
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 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