From f32502b3f5464d62eb12a478e4daefd8f85ac27f Mon Sep 17 00:00:00 2001 From: Philip Cheung Date: Mon, 7 Oct 2024 17:48:59 +0800 Subject: [PATCH] edited --- backend/app/main.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/backend/app/main.py b/backend/app/main.py index 2a58415..5b18721 100644 --- a/backend/app/main.py +++ b/backend/app/main.py @@ -1,5 +1,5 @@ import sentry_sdk -import os +from starlette.staticfiles import StaticFiles from fastapi import FastAPI from fastapi.routing import APIRoute from starlette.middleware.cors import CORSMiddleware @@ -22,10 +22,7 @@ app = FastAPI( ) # app.mount("/static", StaticFiles(directory="static"), name="static") -# static_file_abspath = os.path.join(os.path.dirname(__file__), "static") - -# app.mount("/static", StaticFiles(directory=static_file_abspath), name="static") -app.mount('/static', StaticFiles(directory=os.path.join(current_dir, 'static')), name='static') +app.mount("/static", StaticFiles(directory="app/static")) # Set all CORS enabled origins if settings.BACKEND_CORS_ORIGINS: app.add_middleware(