Migrate pre-1.6 DEVMODE to fastapi_vue.env with in-place patching, run uv sync after dependency changes.

This commit is contained in:
2026-09-14 04:22:24 +00:00
parent 42adf6120d
commit 22d9fe350b
3 changed files with 136 additions and 40 deletions
+3 -3
View File
@@ -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...