Skip to content

Instantly share code, notes, and snippets.

@petrblahos
Created December 6, 2012 19:23
Show Gist options
  • Save petrblahos/4227484 to your computer and use it in GitHub Desktop.
Save petrblahos/4227484 to your computer and use it in GitHub Desktop.
tiny wsgi with webob
from webob import Response
class TinyApp(object):
def __call__(self, environ, start_response):
resp = Response("""<html><body>AHOJ</body></html>""")
return resp(environ, start_response)
if __name__ == '__main__':
from wsgiref.simple_server import make_server
server_ip = ""
server_port = 8080
make_server(server_ip, server_port, TinyApp()).serve_forever()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment