Files
avtoambor/deploy/start.bat
David Beccue 82bb456103 Run dev on host Node 16 and add deploy patch script
Switch make install/run/build/db-* off docker compose onto the host's
Node (via nvm + .nvmrc). better-sqlite3 7.6.2 doesn't build against
Node 20, and the Dockerfile was still pinned to node:20 while the
rest of the project was downgraded to Node 16 in the Win7 bundle
commit; host execution avoids that mismatch.

Also adds scripts/make-patch.sh (make patch) to produce a small
build-only update zip for an already-installed Win7 target, ignores
dist/, and points start.bat at the installed Chrome PWA shortcut
instead of opening a normal browser tab.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-18 20:34:41 +05:00

44 lines
1.2 KiB
Batchfile
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

@echo off
REM Start the Zamena Masla GP server on http://localhost:3000.
if not "%ZMGP_MINIMIZED%"=="1" (
set ZMGP_MINIMIZED=1
start "Zamena Masla GP" /min "%~f0" %*
exit /b
)
chcp 65001 >nul
setlocal
cd /d "%~dp0"
set "NODE_EXE=%ProgramFiles%\nodejs\node.exe"
if not exist "%NODE_EXE%" set "NODE_EXE=%ProgramFiles(x86)%\nodejs\node.exe"
if not exist "%NODE_EXE%" (
echo Node.js не найден. Сначала запустите install.bat.
pause
exit /b 1
)
if not exist "data\avtoambor.db" (
echo База данных не найдена — создаём пустую...
if not exist "data" mkdir data
"%NODE_EXE%" scripts\init-db.js
if errorlevel 1 (
echo Не удалось создать базу данных.
pause
exit /b 1
)
)
set "NODE_ENV=production"
set "PORT=3000"
set "HOST=0.0.0.0"
set "ORIGIN=http://localhost:3000"
REM start "" http://localhost:3000
"C:\Program Files\Google\Chrome\Application\chrome_proxy.exe" --profile-directory=Default --app-id=jndfkokbljfmkpnammckejpeijmbbhhe
echo Сервер запущен на http://localhost:3000
echo Закройте это окно, чтобы остановить программу.
"%NODE_EXE%" build\index.js
endlocal