refactor(api): migrate server to fastapi and uvicorn
Replace the Microdot-only entrypoint with a CombinedASGI app that handles FastAPI routes (audio API, websocket, dev live-reload) while delegating the rest to Microdot. Suppress noisy /__dev/ access logs during live-reload polling. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -13,4 +13,8 @@ if [ -n "${pids}" ]; then
|
||||
fi
|
||||
|
||||
cd "$ROOT_DIR/src"
|
||||
exec python main.py
|
||||
exec env LED_CONTROLLER_LIVE_RELOAD=1 python -m uvicorn fastapi_app:app \
|
||||
--host 0.0.0.0 --port "$PORT" --reload --reload-dir . \
|
||||
--reload-include '**/*.html' --reload-include '**/*.css' --reload-include '**/*.js' \
|
||||
--reload-exclude '**/db/**' --reload-exclude '**/settings.json' \
|
||||
--reload-exclude '**/settings.json.*'
|
||||
|
||||
Reference in New Issue
Block a user