def firing(self, host='localhost', port=8090, **options):
# run coroutx app on gevent wsgiserver
from gevent.wsgi import WSGIServer
if 'debug' in options:
self.debug = options.pop('debug')
if self.debug:
from werkzeug.debug import DebuggedApplication
app = DebuggedApplication(self, evalex=True)
else:
_app = self
print """coroutx app running on {%s => %s}\n""" % (host, port)
WSGIServer((host, port), _app).serve_forever()
评论列表
文章目录