Skip to content
This repository was archived by the owner on May 25, 2026. It is now read-only.

Commit 2edd8a0

Browse files
committed
Fix problems with finding static files for dashboard
1 parent a1f110e commit 2edd8a0

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

api/simqueue/main.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import os
12
from contextlib import asynccontextmanager
23
from fastapi import FastAPI
34
from fastapi.staticfiles import StaticFiles
@@ -71,4 +72,6 @@ async def lifespan(app: FastAPI):
7172
app.include_router(statistics.router, tags=["Statistics"])
7273
app.include_router(auth.router, tags=["Authentication and authorization"])
7374

74-
app.mount("/dashboard", StaticFiles(directory="dashboard", html=True), name="dashboard")
75+
this_dir = os.path.dirname(__file__)
76+
dashboard_path = os.path.join(this_dir, "..", "dashboard")
77+
app.mount("/dashboard", StaticFiles(directory=dashboard_path, html=True), name="dashboard")

0 commit comments

Comments
 (0)