def run(self, host='localhost', port=5000, **options):
"""Runs the application on a local development server"""
# from werkzeug import run_simple
from gevent.wsgi import WSGIServer
from werkzeug.debug import DebuggedApplication
if 'debug' in options:
self.debug = options.pop('debug')
# if self.static_path is not None:
# options['static_files'] = {
# self.static_path: (self.package_name, 'static')
# }
# options.setdefault('use_reloader', self.debug)
# options.setdefault('use_debugger', self.debug)
# return run_simple(host, port, self, **options)
app = DebuggedApplication(self, evalex=False)
WSGIServer((host, port), app).serve_forever()
评论列表
文章目录