Created
December 17, 2010 21:07
-
-
Save zmanji/745708 to your computer and use it in GitHub Desktop.
Hello World with Werkzeug
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
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
from werkzeug import Request, Response | |
@Request.application | |
def application(request): | |
return Response("Hello World!") | |
#if I execute the script directly, it runs this on 8080 | |
if __name__ == "__main__": | |
from werkzeug import run_simple | |
run_simple('localhost',8080,application) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment