update: 2026-03-28 21:00

This commit is contained in:
2026-03-28 21:00:27 +08:00
parent e6866feb29
commit 90590c7cb0
6 changed files with 114 additions and 52 deletions

31
dev.bat Normal file
View File

@@ -0,0 +1,31 @@
@echo off
setlocal
set "ROOT_DIR=%~dp0"
set "MODE=%~1"
if "%MODE%"=="" set "MODE=dev"
if /I "%MODE%"=="dev" goto DEV
if /I "%MODE%"=="build" goto BUILD
echo Usage: sproutgate.bat [dev^|build]
exit /b 1
:DEV
echo ==^> Starting backend (Gin)...
start "SproutGate Backend" cmd /k "cd /d %ROOT_DIR%sproutgate-backend && go run ."
echo ==^> Starting frontend (React)...
cd /d %ROOT_DIR%sproutgate-frontend
npm run dev
exit /b 0
:BUILD
echo ==^> Building frontend...
cd /d %ROOT_DIR%sproutgate-frontend
if not exist node_modules (
npm install
)
npm run build
exit /b 0