ed930cbe12583c9387184f62b84239c959cae673
多站点管理后台
前后端分离的多站点管理系统。
项目结构
yh_web/
├── admin/ # 管理后台前端 (Vue 3 + Element Plus) - 端口 3000
├── web/ # 前台页面 (Vue 3) - 端口 3001
├── server/ # 后端 API (Go + Gin) - 端口 8080
└── README.md
快速启动
1. 启动后端
cd server
go mod tidy
go run main.go
2. 启动管理后台
cd admin
npm install
npm run dev
3. 启动前台
cd web
npm install
npm run dev
访问地址
- 管理后台: http://localhost:3000
- 前台: http://localhost:3001
- API: http://localhost:8080
线上部署(项目根目录:~/project/yh_web)
线上路径为 yxd@server1:~/project/yh_web(即 /home/yxd/project/yh_web)。
首次或克隆后需加执行权限:
chmod +x pull-and-restart.sh restart.sh
若执行脚本报错 bash\r: No such file or directory(行尾为 Windows 的 CRLF),在项目根目录执行一次:
sed -i 's/\r$//' pull-and-restart.sh restart.sh
再执行 chmod +x pull-and-restart.sh restart.sh 后重试。
- 拉取代码并重启:
cd ~/project/yh_web && ./pull-and-restart.sh - 仅重启服务:
cd ~/project/yh_web && ./restart.sh - 对外域名:https://yuheng.yuxindazhineng.com
Description
Languages
Vue
40.9%
Go
28.2%
JavaScript
11.3%
HTML
10.4%
Shell
6.6%
Other
2.6%