Migrate pre-1.6 DEVMODE to fastapi_vue.env with in-place patching, run uv sync after dependency changes.
This commit is contained in:
@@ -4,11 +4,11 @@ from collections.abc import AsyncGenerator
|
||||
from contextlib import asynccontextmanager
|
||||
from pathlib import Path
|
||||
|
||||
import fastapi_vue
|
||||
from fastapi import FastAPI
|
||||
from fastapi_vue import Frontend, env
|
||||
|
||||
# Vue Frontend static files
|
||||
frontend = fastapi_vue.Frontend(Path(__file__).with_name("frontend-build"))
|
||||
frontend = Frontend(Path(__file__).with_name("frontend-build"))
|
||||
|
||||
|
||||
@asynccontextmanager
|
||||
@@ -18,7 +18,7 @@ async def lifespan(_app: FastAPI) -> AsyncGenerator:
|
||||
yield
|
||||
|
||||
|
||||
app = FastAPI(title="PROJECT_TITLE", debug=fastapi_vue.env.dev, lifespan=lifespan)
|
||||
app = FastAPI(title="PROJECT_TITLE", debug=env.dev, lifespan=lifespan)
|
||||
|
||||
|
||||
# Add API routes here...
|
||||
|
||||
Reference in New Issue
Block a user