A backend server for our project web-monitor-dashboard
- flask: Python server of choise
- flasgger: Used to generate the swagger documentation
- flask-marshmallow: My favourite serializer
- apispec: Required for the integration between marshmallow and flasgger
- Clone 本仓库
- 配置数据库接口,创建
instance/config.py
并写入:MONGODB_SETTINGS = { 'db': 'MongoDBAtlas', 'host': "mongodb://......" }
- 安装依赖
pip install -r requirements.txt
- 启动服务端
win
export FLASK_DEBUG=true flask run
set FLASK_DEBUG=true flask run
- 访问 http://localhost:port/apidocs 查看 swagger 文档