INNER CODE UNIT · Python

lifespan

Chanchaldhiman/CANviz · backend/canviz/server.py:42

async def lifespan(app: FastAPI):
    # startup - connections opened on demand via /connect
    yield
    # shutdown - clean up bus and broadcaster gracefully
    await broadcaster.stop()
    await bus_manager._hard_shutdown()


app = FastAPI(
    title="CANviz",
    description="Open-source browser-based CAN bus analyzer",
    version="0.2.4",
    lifespan=lifespan,
)


class CrossOriginIsolationMiddleware(BaseHTTPMiddleware):
    async def dispatch(self, request: Request, call_next) -> Response:

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…