ENV VAR for VUE DIST
This commit is contained in:
@@ -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"))
|
||||
|
||||
Reference in New Issue
Block a user