feat: 新增代码
This commit is contained in:
18
video_worker/scripts/run_server.bat
Normal file
18
video_worker/scripts/run_server.bat
Normal file
@@ -0,0 +1,18 @@
|
||||
@echo off
|
||||
setlocal
|
||||
cd /d %~dp0\..
|
||||
if not exist .venv (
|
||||
echo [ERROR] .venv not found, run scripts\install_windows_env.ps1 first
|
||||
exit /b 1
|
||||
)
|
||||
if not exist .env (
|
||||
echo [ERROR] .env not found, copy from .env.example
|
||||
exit /b 1
|
||||
)
|
||||
call .venv\Scripts\activate.bat
|
||||
for /f "usebackq tokens=1,* delims==" %%A in (".env") do (
|
||||
if not "%%A"=="" set "%%A=%%B"
|
||||
)
|
||||
if "%APP_HOST%"=="" set APP_HOST=0.0.0.0
|
||||
if "%APP_PORT%"=="" set APP_PORT=8000
|
||||
python -m uvicorn app.main:app --host %APP_HOST% --port %APP_PORT%
|
||||
Reference in New Issue
Block a user