gunicornserver.py 文件源码

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

项目:openedoo 作者: openedoo 项目源码 文件源码
def run(self, host, port, workers):
        """Start the Server with Gunicorn"""
        from gunicorn.app.base import Application

        class FlaskApplication(Application):
            def init(self, parser, opts, args):
                return {
                    'bind': '{0}:{1}'.format(host, port),
                    'workers': workers
                }

            def load(self):
                return app

        application = FlaskApplication()
        return application.run()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号