20 lines
619 B
Batchfile
20 lines
619 B
Batchfile
|
|
@echo off
|
||
|
|
REM 语音确认入口;详见 README.md
|
||
|
|
REM start.bat [端口] 默认 start_http.bat
|
||
|
|
REM start.bat --single [端口] 打包 dist 后等价 dist\start_http.bat
|
||
|
|
REM VOCH_HTTP_BIND=127.0.0.1 可仅监听本机;默认 0.0.0.0 供局域网终端访问
|
||
|
|
setlocal
|
||
|
|
cd /d "%~dp0"
|
||
|
|
if /I "%~1"=="--single" (
|
||
|
|
shift
|
||
|
|
set "PORT=%~1"
|
||
|
|
if "%PORT%"=="" set "PORT=8080"
|
||
|
|
if "%VOCH_HTTP_BIND%"=="" set "VOCH_HTTP_BIND=0.0.0.0"
|
||
|
|
python scripts\bundle_single_html.py
|
||
|
|
call dist\start_http.bat %PORT%
|
||
|
|
exit /b %ERRORLEVEL%
|
||
|
|
)
|
||
|
|
set "PORT=%~1"
|
||
|
|
if "%PORT%"=="" set "PORT=8080"
|
||
|
|
call start_http.bat %PORT%
|