PMFlow/启动说明.md

74 lines
1.2 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# Neural Sync 一键启动指南
## 启动方式
### 方式一:双击启动(推荐)
在 Finder 中**双击**以下文件即可:
| 文件 | 功能 |
|------|------|
| 📄 `启动.command` | 一键启动前后端 |
| 📄 `stop.sh` | 停止所有服务 |
### 方式二:命令行启动
```bash
# 启动所有服务
./start.sh
# 或使用简化版
./启动.command
# 停止所有服务
./stop.sh
```
### 方式三:Python 脚本(跨平台)
```bash
# 启动
python launcher.py
# 停止
python stop.py
```
## 服务地址
启动后访问以下地址:
| 服务 | 地址 | 说明 |
|------|------|------|
| 前端 | http://127.0.0.1:5173 | 主界面 |
| 后端 | http://127.0.0.1:8000 | API 服务 |
| API 文档 | http://127.0.0.1:8000/docs | Swagger 文档 |
## 查看日志
```bash
# 查看后端日志
tail -f logs/backend.log
# 查看前端日志
tail -f logs/frontend.log
```
## 常见问题
### Q: 双击 .command 文件提示无法执行?
A: 在终端中运行以下命令添加执行权限:
```bash
chmod +x 启动.command
```
### Q: 前端/后端启动失败?
A: 检查日志文件:
```bash
cat logs/backend.log
cat logs/frontend.log
```
### Q: 端口被占用?
A: 运行 `./stop.sh` 清理端口后再启动。