"Add Windows installer and driver training rewards"

This commit is contained in:
larssand
2026-08-24 14:48:49 +02:00
parent 4c0e94bc50
commit de7b4adfe0
21 changed files with 2068 additions and 210 deletions

View File

@@ -2,14 +2,25 @@
setlocal
for %%I in ("%~dp0..") do set "APP_DIR=%%~fI"
set "LOG_DIR=%APP_DIR%\logs"
if not exist "%LOG_DIR%" mkdir "%LOG_DIR%"
where node.exe >nul 2>&1
if errorlevel 1 (
echo [ERROR] Node.js was not found. Run windows\install.bat first.
exit /b 1
)
start "RC Timing Backend" /min cmd /c "cd /d \"%APP_DIR%\" && npm start >> \"%LOG_DIR%\backend.log\" 2>&1"
pushd "%APP_DIR%"
call npm.cmd start
set "EXIT_CODE=%ERRORLEVEL%"
popd
if not "%EXIT_CODE%"=="0" (
echo [ERROR] Backend start failed.
exit /b %EXIT_CODE%
)
echo [OK] Backend started in background
echo URL: http://localhost:8081
echo Log: %LOG_DIR%\backend.log
echo Logs: %APP_DIR%\logs\server.out.log
endlocal