Files
Cyrene_v2/start.bat
T
Aska 78c5f0f1b0 chore: add cross-platform startup scripts
- start.sh: Linux/macOS一键启动 (编译+后端+前端+健康检查)
- start.bat: Windows批处理 (两个终端窗口)
- Ctrl+C优雅退出,环境变量可覆盖
2026-08-12 17:36:22 +08:00

37 lines
923 B
Batchfile

@echo off
setlocal
cd /d "%~dp0"
set LLM_API_KEY=sk-test
set JWT_SECRET=cyrene-v2-dev-secret-key-32bytes!!
set ADMIN_PASSWORD=admin12345
echo ============================================
echo Cyrene v2 — Windows 启动脚本
echo ============================================
echo [1/2] 编译后端...
cd backend
go build -o cyrene.exe ./cmd/cyrene/
if %errorlevel% neq 0 (
echo 后端编译失败
pause
exit /b 1
)
echo [1/2] 启动后端 (http://localhost:8080)...
start "Cyrene Backend" cmd /c "set LLM_API_KEY=%LLM_API_KEY% && set JWT_SECRET=%JWT_SECRET% && set ADMIN_PASSWORD=%ADMIN_PASSWORD% && cyrene.exe"
cd ..\frontend\web
echo [2/2] 启动前端 (http://localhost:5173)...
start "Cyrene Frontend" cmd /c "npx vite --host 0.0.0.0"
echo.
echo Cyrene v2 启动完成
echo 前端: http://localhost:5173
echo 后端: http://localhost:8080
echo 账号: admin / %ADMIN_PASSWORD%
echo.
pause