jupyverse icon indicating copy to clipboard operation
jupyverse copied to clipboard

mount jupyverse in fastapi app

Open HaoXuAI opened this issue 6 months ago • 1 comments

Problem

Is there a way to mount jupyvers APIs into another fastapi app? e.g, I have something like:

app = FastAPI()

And I started the server with gunicorn server:app..., is there a way to just mount all jupyverse in the app without starting it with the asphalt?

Proposed Solution

the current way I'm doing is:

# Create the app.
app = App()
jupyverse_app = App(app.api, "jupyverse")

frontend_config = FrontendConfig()
auth_config = _AuthConfig()

auth = auth_factory(jupyverse_app, auth_config, frontend_config)

But feels like too hacking.

Additional context

HaoXuAI avatar Aug 07 '24 16:08 HaoXuAI