fix start and install bat
This commit is contained in:
24
windows/restart_backend.bat
Normal file
24
windows/restart_backend.bat
Normal file
@@ -0,0 +1,24 @@
|
||||
@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
|
||||
Reference in New Issue
Block a user