-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathstart-qmt-gateway.bat
More file actions
27 lines (23 loc) · 991 Bytes
/
Copy pathstart-qmt-gateway.bat
File metadata and controls
27 lines (23 loc) · 991 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
@echo off
setlocal
cd /d "%~dp0"
REM ============================================================
REM start-qmt-gateway.bat — Start the QMT Gateway server.
REM
REM On first run, automatically creates .venv and installs
REM dependencies (delegates to setup-venv.bat).
REM ============================================================
if not exist ".venv\Scripts\python.exe" (
call "%~dp0setup-venv.bat"
if errorlevel 1 exit /b %errorlevel%
)
if not defined QMT_GATEWAY_HOME set "QMT_GATEWAY_HOME=%~dp0data\home"
if not defined QMT_GATEWAY_HOST set "QMT_GATEWAY_HOST=0.0.0.0"
if not defined QMT_GATEWAY_PORT set "QMT_GATEWAY_PORT=8130"
set "PYTHONUTF8=1"
echo [qmt-gateway] home=%QMT_GATEWAY_HOME%
echo [qmt-gateway] starting http://%QMT_GATEWAY_HOST%:%QMT_GATEWAY_PORT%
echo [qmt-gateway] press Ctrl+C to stop
".venv\Scripts\python.exe" -m uvicorn qmt_gateway.app:app --host %QMT_GATEWAY_HOST% --port %QMT_GATEWAY_PORT%
set "EXIT_CODE=%ERRORLEVEL%"
endlocal & exit /b %EXIT_CODE%