Is there a way to deploy a fastapi app on cpanel?

╄→гoц情女王★ 提交于 2021-01-07 01:34:42

问题


I'm having trouble deploying a FastAPI app on cpanel with Passenger


回答1:


You might be able to run your FastAPI app using a2wsgi:

In your passenger_wsgi.py:

from a2wsgi import ASGIMiddleware
from main import app  # Import your FastAPI app.

application = ASGIMiddleware(app)



回答2:


Applied the python package a2wsgi for resolving the problem but it's not working.



来源:https://stackoverflow.com/questions/65114261/is-there-a-way-to-deploy-a-fastapi-app-on-cpanel

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!