Skip to content

Instantly share code, notes, and snippets.

@Eugeny
Created May 23, 2011 14:25
Show Gist options
  • Save Eugeny/986775 to your computer and use it in GitHub Desktop.
Save Eugeny/986775 to your computer and use it in GitHub Desktop.
class AppDispatcher(object):
def dispatcher(self, environ, start_response):
....
startup:
# Start server
host = ...
port = ...
resource = WSGIResource(
reactor,
reactor.getThreadPool(),
AppDispatcher().dispatcher
)
site = server.Site(resource)
reactor.listenTCP(port, site)
reactor.run()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment