@echo off REM Local dev startup script (Windows) - mirror of run.sh REM REM Usage: REM cd shaguabijia-app-server REM run.bat REM REM Listens on 0.0.0.0:8770 (works for both real device via adb reverse REM and LAN). Auto-reload on code change. REM REM Prerequisite (first time): REM conda activate pricebot ^&^& pip install -e . REM copy .env.example .env ^&^& fill JWT_SECRET_KEY REM REM This file is the Windows-native peer of run.sh. Keeping run.sh untouched REM avoids CRLF/encoding fights every time someone bash-runs the .sh on Win. cd /d "%~dp0" if not exist .env ( echo [X] Missing .env. Run: copy .env.example .env and fill JWT_SECRET_KEY ^(plus MT_CPS_* if you test Meituan^) exit /b 1 ) if not exist data mkdir data REM Build/upgrade SQLite schema (idempotent; no-op if already at head) call alembic upgrade head if errorlevel 1 ( echo [X] alembic upgrade head failed exit /b %errorlevel% ) REM Long-running foreground process. Ctrl+C to stop. uvicorn app.main:app --host 0.0.0.0 --port 8770 --reload