Files
python-api/app/asgi.py
2026-03-01 07:44:19 +09:00

16 lines
549 B
Python

import socketio
from app.communication.socketio.server import sio
from app.main import create_app
# Import namespace handlers to register them
import app.communication.socketio.events # noqa: F401
import app.communication.socketio.namespaces.device_ns # noqa: F401
import app.communication.socketio.namespaces.monitoring_ns # noqa: F401
import app.communication.socketio.namespaces.notification_ns # noqa: F401
fastapi_app = create_app()
# Socket.IO wraps FastAPI as the outermost ASGI app
app = socketio.ASGIApp(sio, other_app=fastapi_app)