Created
June 24, 2011 13:55
-
-
Save pkqk/1044814 to your computer and use it in GitHub Desktop.
Python on Heroku cedar stack
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
web: bin/python test-webapp.py |
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
wsgiref==0.1.2 |
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
import wsgiref, wsgiref.simple_server, os | |
def test_webapp(environ, start_response): | |
start_response('200 OK',[('Content-Type', 'text/html; charset=utf-8')]) | |
return ['Hello World'] | |
if __name__ == "__main__": | |
port = int(os.environ.get("PORT", 5000)) | |
srv = wsgiref.simple_server.make_server('0.0.0.0', port, test_webapp) | |
srv.serve_forever() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment