diff --git a/backend/app/main.py b/backend/app/main.py index f6e7c42..d941db2 100644 --- a/backend/app/main.py +++ b/backend/app/main.py @@ -1,4 +1,5 @@ import sentry_sdk +import os from fastapi import FastAPI from fastapi.routing import APIRoute from starlette.middleware.cors import CORSMiddleware @@ -18,8 +19,12 @@ app = FastAPI( title=settings.PROJECT_NAME, openapi_url=f"{settings.API_V1_STR}/openapi.json", generate_unique_id_function=custom_generate_unique_id, + ) -app.mount("/static", StaticFiles(directory="static"), name="static") +# app.mount("/static", StaticFiles(directory="static"), name="static") +script_dir = os.path.dirname(__file__) +st_abs_file_path = os.path.join(script_dir, "static/") +app.mount("/static", StaticFiles(directory=st_abs_file_path), name="static") # Set all CORS enabled origins if settings.BACKEND_CORS_ORIGINS: app.add_middleware(