"Add Windows installer and driver training rewards"
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user