Skip to content

Instantly share code, notes, and snippets.

@christianb93
Created November 11, 2019 12:20
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 christianb93/097487db795db2064d346235fb53fbb6 to your computer and use it in GitHub Desktop.
Save christianb93/097487db795db2064d346235fb53fbb6 to your computer and use it in GitHub Desktop.
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