使用 FastAPI + SQLAchemy + Vue + Element UI 构建的后台管理系统。
提供多种环境安装方式;
(1)本机安装:
pip3 install -r requirements.txt
(2)Python 虚拟环境安装:
-
pipenv
pipenv install
-
poetry
poetry install
(3)Docker
- 待定。。
python3 main.py
或者
uvicorn main:app --reload
服务启动之后根据终端提示在浏览器访问;
开发环境:
IP:8000/docs
# 自动生成迁移文件
alembic revision --autogenerate -m "描述"
# 执行迁移
alembic upgrade head
开发环境:
cd frontend
# 安装依赖
npm install --registry=https://registry.npm.taobao.org
# 启动开发环境
npm run dev
打包:
npm run build