Files
SillyTavern-Launcher/bin/functions/launch/log_wrapper.bat
Blueprint Coding 56bc5cbcee Major Backend Rework - Modularized Many Functions
Users shouldn't see much of a difference on the front end. Version # 1.2.0 -> V1.2.1

Removed the following from Launcher.bat and created modular bat files for the sub-functionality.

- :start_st - > start_st.bat
- :exit - > exit_stl.bat
- :unresolved_unmerged -> unresolved_unmerged.bat
- :remove_pip_cache -> remove_pip_cache.bat
- :remove_node_modules - > remove_node_modules.bat
- :onboarding_flow -> onboarding_flow.bat
- :find_app_port -> find_app_port.bat
- :export_dxdiag -> export_dxdiag.bat

Moved all logs, dxdiag_info.txt and pids.txt to bin/logs/

updated start_st_rl to use same launching and auto-fixing function as start_st

Fixed :onboarding_flow to work with the new user data structure of SillyTavern

Added redirect flow controllers to troubleshooting sub function menus so they can redirect back to troubleshooting or home menus based on where they are called.
2024-07-06 18:08:02 -06:00

25 lines
693 B
Batchfile

@echo off
setlocal
REM Define the path to the log file
set LOG_FILE=%~dp0..\..\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