feat: complete Phase 6 - Hybrid Coexistence testing, PWA kiosk mode, static SPA mount and Pilot manual (v0.6.0-beta)
This commit is contained in:
@@ -60,8 +60,15 @@ async def root():
|
||||
}
|
||||
|
||||
|
||||
from pathlib import Path
|
||||
from fastapi.staticfiles import StaticFiles
|
||||
from app.api.v1.websockets import router as ws_router
|
||||
|
||||
# Montaje de routers versionados y WebSockets
|
||||
app.include_router(api_router, prefix="/api/v1")
|
||||
app.include_router(ws_router)
|
||||
|
||||
# Si el build de producción del frontend existe, servirlo estáticamente
|
||||
frontend_dist = Path(__file__).resolve().parent.parent.parent / "frontend" / "dist"
|
||||
if frontend_dist.is_dir() and (frontend_dist / "index.html").is_file():
|
||||
app.mount("/", StaticFiles(directory=str(frontend_dist), html=True), name="frontend_spa")
|
||||
|
||||
Reference in New Issue
Block a user