Files
Live_RC/windows/restart_backend.bat
2026-08-24 18:29:39 +02:00

25 lines
493 B
Batchfile

@echo off
setlocal
for %%I in ("%~dp0..") do set "APP_DIR=%%~fI"
where node.exe >nul 2>&1
if errorlevel 1 (
echo [ERROR] Node.js was not found. Run windows\install.bat first.
exit /b 1
)
pushd "%APP_DIR%"
call npm.cmd restart
set "EXIT_CODE=%ERRORLEVEL%"
popd
if not "%EXIT_CODE%"=="0" (
echo [ERROR] Backend restart failed.
exit /b %EXIT_CODE%
)
echo [OK] Backend restarted in background
echo URL: http://localhost:8081
echo Logs: %APP_DIR%\logs\server.out.log
endlocal