fastapi-vue-blog Python异步后端实现博客系统
- 后端框架:
- Python Web 框架:FastAPI
- 数据库:MySQL
- ORM:SQLAlchemy
- 搜索:Elasticsearch (未集成)
- 前端框架:Vue
- 博客界面:BootstrapVue
- 管理界面:ElementUI
后端
- Python版本 3.7.x (建议使用虚拟环境)
- MySQL版本 5.7.x
- 后端配置数据库和账号密码
- 在fastapi-vue-blog/webapi目录下
- 修改setting文件
- 初始化和启动
- 在fastapi-vue-blog/webapi目录下
- pip install -r requirements.txt
- 如果需要初始化数据库 python db/init_db.py
- python app.py
前端
- Node版本: 12.13.x
- 安装好Node和vue-cli
- 在fastapi-vue-blog/webapi目录下
- 安装依赖: npm install
- 启动开发: npm run dev
游客
- 可以看到所有文章
- 可以看到所有类别
- 可以根据分类筛选文章列表
- 在文章中可以看到评论
- 全文高亮搜索
管理员
- 数据统计
- 文章管理
- 类别管理
- 评论管理







