Created
November 11, 2019 12:20
-
-
Save christianb93/097487db795db2064d346235fb53fbb6 to your computer and use it in GitHub Desktop.
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 wsgiref.simple_server import make_server | |
class Application: | |
def __init__(self, environ, start_response): | |
self.environ = environ | |
self.start_response = start_response | |
def __iter__(self): | |
self.start_response( | |
'200 OK', | |
[('Content-type', 'text/html')] | |
) | |
yield b'Hello!' | |
httpd = make_server('', 8800, Application) | |
httpd.serve_forever() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment