-
多线程方式
- app.run(
threaded
=True) - param
threaded
: should the process handle each request in a separate thread?
- app.run(
-
多进程方式
- app.run(
processes
=True) - param
processes
: if greater than 1 then handle each request in a new process up to this maximum number of concurrent processes.
- app.run(
- reference: https://blog.igevin.info/posts/how-to-deploy-flask-apps/
- gunicorn -c gunicorn.py backend.wsgi:app
- python main.py pro
- python main.py dev