![](https://img-blog.csdnimg.cn/20201014180756913.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
后端
文章平均质量分 88
LodbkMi
这个作者很懒,什么都没留下…
展开
-
supervisor+nginx+gunicorn 部署
安装gunicorn && 启动(env) apt install gunicorngunicorn --workers=4 --bind=0.0.0.0:8002 wsgi:app上面的命令等价于gunicorn -w 4 -b 0.0.0.0:8002 wsgi:appwsgi 为项目根目录下的wsgi.py app是该文件中实例对象我们后面将使用superviso...原创 2020-04-10 14:17:12 · 222 阅读 · 0 评论 -
flask flask-sqlalchemy使用
连接数据库 mysqlfrom flask import Flaskfrom flask_sqlalchemy import SQLAlchemyapp=Flask(__name__)app.config['SQLALCHEMY_DATABASE_URI']=''mysql+pymysql://root:root@127.0.0.1:3306/test'models.py 文件d...原创 2019-06-01 17:47:38 · 96 阅读 · 0 评论