feat():learning后台管理项目初始化

This commit is contained in:
yuj
2025-12-04 16:23:46 +08:00
parent 39886d50d2
commit 88e048f4d1
154 changed files with 28966 additions and 6 deletions

36
start_with_cors.sh Normal file
View File

@@ -0,0 +1,36 @@
#!/bin/bash
# GoalfyMax Admin 启动脚本带CORS支持
echo "启动 GoalfyMax Admin 服务..."
# 检查Go环境
if ! command -v go &> /dev/null; then
echo "错误: 未找到Go环境请先安装Go 1.25+"
exit 1
fi
# 检查配置文件
if [ ! -f "etc/config.yaml" ]; then
echo "错误: 配置文件 etc/config.yaml 不存在"
exit 1
fi
# 下载依赖
echo "下载依赖..."
go mod download
# 构建项目
echo "构建项目..."
go build -o bin/goalfymax-admin cmd/server/main.go
# 启动服务
echo "启动服务支持CORS..."
echo "服务地址: http://localhost:8084"
echo "健康检查: http://localhost:8084/health"
echo "配额历史: http://localhost:8084/api/quotas/history"
echo ""
echo "按 Ctrl+C 停止服务"
echo ""
./bin/goalfymax-admin -config etc/config.yaml