Skip to content

Instantly share code, notes, and snippets.

@j2labs
Forked from andyparsons/gist:1609226
Created January 13, 2012 23:04
Show Gist options
  • Save j2labs/1609243 to your computer and use it in GitHub Desktop.
Save j2labs/1609243 to your computer and use it in GitHub Desktop.
# gevent
from gevent import monkey
monkey.patch_all()
from gevent.wsgi import WSGIServer
http_server = WSGIServer(('', port), app)
http_server.serve_forever()
# tornado
from tornado.wsgi import WSGIContainer
from tornado.httpserver import HTTPServer
from tornado.ioloop import IOLoop
http_server = HTTPServer(WSGIContainer(app))
http_server.listen(port)
IOLoop.instance().start
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment