Skip to content

Instantly share code, notes, and snippets.

@apiguy
Created January 28, 2013 22:47
Show Gist options
  • Save apiguy/4660026 to your computer and use it in GitHub Desktop.
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.
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