#!/usr/bin/env python # -*- encoding: utf-8 -*- """ @Contact : liuyuqi.gov@msn.cn @Time : 2024/04/09 12:48:43 @License : Copyright © 2017-2022 liuyuqi. All Rights Reserved. @Desc : enter point """ from fgh import create_app app = create_app() if __name__=='__main__': # app.run(host="127.0.0.1", port=8080, debug=True) # 注意:flask支持wsgi,uvicorn是asgi,转换一下协议 import uvicorn from asgiref.wsgi import WsgiToAsgi asgi_app = WsgiToAsgi(app) uvicorn.run(asgi_app, host="0.0.0.0", port=8080,)