refactor: relocate node tools to node-win and implement centralized server backend in serve.cjs

This commit is contained in:
jarves committed 2026-06-04 05:50:29 +00:00
1 parent aa3620045c
commit 6613db72b9
3 files changed
+70 -28

No files matched your search

+5 -5
View File
@@ -3,8 +3,8 @@ title Local AI Image Generator
cd /d "%~dp0"
set APP=%~dp0app
set NODE=%APP%\tools\node\node.exe
set NPM=%APP%\tools\node\npm.cmd
set NODE=%APP%\tools\node-win\node.exe
set NPM=%APP%\tools\node-win\npm.cmd
set DIST=%APP%\dist\index.html
set SETUP=%~dp0scripts\setup.ps1
set CUDA_BACKEND=%APP%\backend\win\cuda\sd-cuda.exe
@@ -14,7 +14,7 @@ set SETUP_REASON=
set SETUP_MODE=Repair
:: ── First-time setup check ────────────────────────────────────────────────────
if not exist "%APP%\tools\node" set SETUP_MODE=First-Time Setup
if not exist "%APP%\tools\node-win" set SETUP_MODE=First-Time Setup
if not exist "%NODE%" (
set SETUP_REASON=Portable Node.js is missing.
goto :run_setup
@@ -49,7 +49,7 @@ echo.
echo Press any key to continue, or Ctrl+C to cancel.
pause >nul
:: Clear old local server processes before setup so app/tools/node can be replaced
:: Clear old local server processes before setup so app/tools/node-win can be replaced
for /f "tokens=5" %%a in ('netstat -aon 2^>nul ^| findstr ":8080 "') do taskkill /f /pid %%a >nul 2>nul
for /f "tokens=5" %%a in ('netstat -aon 2^>nul ^| findstr ":1420 "') do taskkill /f /pid %%a >nul 2>nul
@@ -103,4 +103,4 @@ pause >nul
:: Cleanup on exit
echo Shutting down...
taskkill /fi "WINDOWTITLE eq SD-Server*" /f >nul 2>nul
echo Done. Goodbye!
echo Done. Goodbye!