flask.py 文件源码

python
阅读 24 收藏 0 点赞 0 评论 0

项目:coroutx 作者: neo1218 项目源码 文件源码
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()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号