Created
December 6, 2012 19:23
-
-
Save petrblahos/4227484 to your computer and use it in GitHub Desktop.
tiny wsgi with webob
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 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