From 502992f69d23292aa527e24526c7364356886450 Mon Sep 17 00:00:00 2001 From: William Bruno Date: Sat, 4 Apr 2026 19:02:16 -0400 Subject: [PATCH] ENV VAR for VUE DIST --- src/pymd3_vue_location_sim/server.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/pymd3_vue_location_sim/server.py b/src/pymd3_vue_location_sim/server.py index 58aff1c..88cf6db 100644 --- a/src/pymd3_vue_location_sim/server.py +++ b/src/pymd3_vue_location_sim/server.py @@ -192,6 +192,7 @@ class TunneldRunnerSio: port, ) self._app = APIRouter() + self._vue_dist = os.getenv("VUE_DIST") self._vue_app = FastAPI( title="iOS Device Management API", lifespan=lifespan, @@ -1644,11 +1645,11 @@ class TunneldRunnerSio: self._vue_app.include_router(self._app, prefix="/api") self._vue_app.mount( - "/assets", StaticFiles(directory="../../front-end/dist/spa/assets", html=True), name="vue") + "/assets", StaticFiles(directory=self._vue_dist, html=True), name="vue") @self._vue_app.get("/{full_path:path}") async def serve_vue_app(full_path: str): - return FileResponse("../../front-end/dist/spa/index.html") + return FileResponse(self._vue_dist + "index.html") def _run_app(self) -> None: # api = uvicorn.Server(uvicorn.Config(self._app, host=self.host, port=49151, log_level="info"))