版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/adley_app/article/details/82813009
Gunicorn ‘Green Unicorn’ is a Python WSGI HTTP Server for UNIX.
官网:https://gunicorn.org/
安装:
pip install gunicorn
#或者
sudo apt install gunicorn
基本使用:
- 启动一个flask的项目:
# myapp py文件
# app 启动
gunicorn -w 4 myapp:app
绑定IP,PORT
gunicorn -w 4 test:app -b 192.168.1.51:8080
守护进程启动
gunicorn -w 4 myapp:app --daemon