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)