Files

34 lines
754 B
Markdown
Raw Permalink Normal View History

# Agent Desk 后端
客服系统后端 API 项目,使用 Go、Gin、GORM 和 `github.com/mlogclub/simple`
前端已拆分为独立项目,默认位于同级目录 `../agent-desk-web`
## 本地开发
```bash
cp config/config.example.yaml config/config.yaml
go mod download
make dev
```
默认 API 地址:`http://127.0.0.1:8083`,健康检查:
```text
GET http://127.0.0.1:8083/api/health
```
`config/config.yaml` 中将 `server.frontendUrl``server.cors.allowedOrigins` 配置为前端地址,本地默认为 `http://127.0.0.1:3000`
## 常用命令
```bash
make dev
make build
make test
make generator
make enums FRONTEND_DIR=../agent-desk-web
```
`make enums` 会把后端定义的共享枚举生成到前端项目。