Files
SillyTavern-Launcher/bin/functions/launch/log_wrapper.bat
Blueprint Coding 25c69c577c Modularization/Organization - Find App Title for Port
Added some basic modularization and reorganization.

- Moved logs to /bin/logs
- Moved create_ssl.bat, fetch_title.js and log_wrapper.bat to /bin/functions/~/

Add functionality to troubleshooting port finder to find the Title of the the application using the port
2024-07-06 12:30:39 -06:00

25 lines
689 B
Batchfile

@echo off
setlocal
REM Define the path to the log file
set LOG_FILE=..\bin\logs\st_console_output.log
REM Set necessary environment variables for Node.js
set NODE_ENV=production
REM Determine the command to run
if "%1"=="ssl" (
set NODE_CMD=node server.js --ssl
) else (
set NODE_CMD=node server.js
)
REM Start the Node.js server and log the output using PowerShell Tee-Object, suppressing specific warnings
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 '%LOG_FILE%'}"
echo Node.js server started.
pause
REM Pause to keep the window open
pause