Created
January 28, 2013 22:47
-
-
Save apiguy/4660026 to your computer and use it in GitHub Desktop.
Super basic way to get a wsgi app running on cherrypy with autoreload. Useful for development and testing.
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 cherrypy | |
from main import app | |
cherrypy.config.update({'server.socket_host': '0.0.0.0', | |
'server.socket_port': 8080}) | |
cherrypy.tree.graft(app) | |
if __name__ == '__main__': | |
try: | |
cherrypy.engine.start() | |
except KeyboardInterrupt: | |
cherrypy.engine.stop() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment