Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion burr/tracking/server/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,17 @@ async def lifespan(app: FastAPI):
await backend.lifespan(app).__anext__()


app = FastAPI(lifespan=lifespan)
def create_burr_ui_app() -> FastAPI:
return FastAPI(lifespan=lifespan)

app = create_burr_ui_app()

def mount_burr_ui(parent_app: FastAPI, path: str = "/burr") -> None:
"""
Mount the Burr UI inside another FastAPI app.
"""
ui_app = create_burr_ui_app()
parent_app.mount(path, ui_app, name="burr-ui")


@app.get("/ready")
Expand Down