Gunicorn can't find app when name changed from “application”

前端 未结 2 1276
天涯浪人
天涯浪人 2020-12-01 06:12

I use gunicorn --workers 3 wsgi to run my Flask app. If I change the variable application to myapp, Gunicorn gives the error Ap

2条回答
  •  天涯浪人
    2020-12-01 06:53

    If you're trying to serve an app with variable name app within server/cats.py, you can start the server on port 8000 as follows:

    gunicorn server.cats:app -b 0.0.0.0:8000
    

提交回复
热议问题