Startup box improvements.
This commit is contained in:
@@ -21,11 +21,13 @@ from fastapi_vue import Frontend
|
||||
|
||||
frontend = Frontend(Path(__file__).with_name("frontend-build"), spa=True)
|
||||
|
||||
|
||||
@asynccontextmanager
|
||||
async def lifespan(app: FastAPI):
|
||||
await frontend.load()
|
||||
yield
|
||||
|
||||
|
||||
app = FastAPI(lifespan=lifespan)
|
||||
|
||||
# Add API routes here...
|
||||
|
||||
Reference in New Issue
Block a user