diff --git a/bin/functions/Home/log_wrapper.bat b/bin/functions/Home/log_wrapper.bat index 7054ebe..f314b53 100644 --- a/bin/functions/Home/log_wrapper.bat +++ b/bin/functions/Home/log_wrapper.bat @@ -11,11 +11,8 @@ if "%1"=="ssl" ( set NODE_CMD=node server.js ) -REM Start the Node.js server and log the output using PowerShell Tee-Object, suppressing specific warnings +REM Start the Node.js server and log the output using PowerShell Tee-Object echo Starting Node.js server with command: %NODE_CMD% -powershell -Command "& {%NODE_CMD% 2>&1 | Where-Object {$_ -notmatch 'Security has been overridden'} | Tee-Object -FilePath '%logs_st_console_path%'}" -echo Node.js server started. -pause - -REM Pause to keep the window open +cmd /c "%NODE_CMD%" 2>&1 | powershell -Command "$input | Tee-Object -FilePath '%logs_st_console_path%'" +echo Node.js server stopped. pause