@echo off chcp 65001 >nul echo ========================================== echo Epic Game Web Service echo Starting with cron jobs enabled... echo ========================================== REM 检查Go环境 go version >nul 2>&1 if errorlevel 1 ( echo Error: Go is not installed or not in PATH pause exit /b 1 ) REM 检查Go版本 for /f "tokens=3" %%i in ('go version') do set GO_VERSION=%%i echo Go version: %GO_VERSION% REM 设置环境变量 set GO_ENV=production set GF_GCFG_FILE=manifest/config/config.yaml REM 清理旧的构建文件 echo Cleaning old build files... if exist main.exe del main.exe if exist main del main REM 构建项目 echo Building project... go build -o main.exe . if errorlevel 1 ( echo Error: Build failed pause exit /b 1 ) echo Build successful! REM 启动服务 echo Starting server on port 8283... echo Cron jobs will be started automatically... echo Press Ctrl+C to stop the server echo ========================================== REM 运行服务 main.exe