Files
map-asset-gateway/start-all.bat
T

39 lines
1.2 KiB
Batchfile

@echo off
setlocal
chcp 65001 >nul 2>&1
set "ROOT=%~dp0"
call "%ROOT%scripts\load-env.bat" "%ROOT%config\service.env"
set "LAUNCHER_DIR=%ROOT%temp\launcher"
if not exist "%LAUNCHER_DIR%" mkdir "%LAUNCHER_DIR%" >nul 2>&1
set "RS_API_PID_FILE=%LAUNCHER_DIR%\api.pid"
del /q "%RS_API_PID_FILE%" >nul 2>&1
if "%API_HOST%"=="" set "API_HOST=127.0.0.1"
if "%API_PORT%"=="" set "API_PORT=8910"
if "%API_BASE_URL%"=="" set "API_BASE_URL=http://127.0.0.1:%API_PORT%"
echo ========================================
echo Map Asset Gateway Launcher
echo ========================================
echo.
echo Env file: %ROOT%config\service.env
echo Starting Go service in a separate window...
echo.
powershell -NoProfile -ExecutionPolicy Bypass -Command "Start-Process -FilePath 'cmd.exe' -ArgumentList '/k','call ""%ROOT%scripts\run-api.bat""' -WorkingDirectory '%ROOT%' | Out-Null"
echo ========================================
echo Management Entry
echo ========================================
echo.
echo Admin Console : %API_BASE_URL%/admin/
echo API Health : %API_BASE_URL%/health
echo API Ready : %API_BASE_URL%/ready
echo Stop All : %ROOT%stop-all.bat
echo PID Files : %LAUNCHER_DIR%
echo.
if "%NO_PAUSE%"=="" pause