File tree Expand file tree Collapse file tree 1 file changed +61
-5
lines changed
Expand file tree Collapse file tree 1 file changed +61
-5
lines changed Original file line number Diff line number Diff line change @@ -39,25 +39,81 @@ models/
3939### 环境要求
4040
4141- Python 3.13+
42+ - Node.js 20+
43+ - npm 10+
4244
43- ### 安装依赖
45+ ### 快速启动(推荐)
46+
47+ 使用开发辅助脚本同时启动前端和后端:
4448
4549``` bash
46- pip install -r requirements.txt
50+ python run.py
4751```
4852
49- ### 运行开发服务器
53+ 这将自动:
54+
55+ - 启动后端API服务
56+ - 启动前端Vite开发服务器
57+ - 打开浏览器访问前端页面
58+
59+ 可用选项:
60+
61+ - ` --port <端口号> ` - 指定后端API端口
62+ - ` --no-browser ` - 不自动打开浏览器
5063
5164``` bash
52- python main.py
65+ # 示例:指定端口并不自动打开浏览器
66+ python run.py --port 8000 --no-browser
5367```
5468
55- ### 构建可执行文件
69+ ### 分别启动(手动模式)
70+
71+ #### 后端开发
72+
73+ 1 . 安装Python依赖
74+
75+ ``` bash
76+ pip install -r requirements.txt
77+ ```
78+
79+ 2 . 运行开发服务器
80+
81+ ``` bash
82+ python main.py --dev
83+ ```
84+
85+ #### 前端开发
86+
87+ 1 . 进入前端目录
88+
89+ ``` bash
90+ cd frontend
91+ ```
92+
93+ 2 . 安装依赖
94+
95+ ``` bash
96+ npm install
97+ ```
98+
99+ 3 . 启动开发服务器
100+
101+ ``` bash
102+ npm run dev
103+ ```
104+
105+ 前端开发服务器默认运行在 < http://localhost:5173 >
106+
107+ ### 构建应用
108+
109+ 一键构建整个应用(包含前端和后端):
56110
57111``` bash
58112python build.py
59113```
60114
115+ 构建结果将在 ` dist ` 目录下生成。
116+
61117## 许可证
62118
63119本项目采用 MIT 许可证 - 详见 [ LICENSE] ( LICENSE ) 文件
You can’t perform that action at this time.
0 commit comments