diff --git a/store/app/main.py b/store/app/main.py index 112cbb6c..01dbd1a0 100644 --- a/store/app/main.py +++ b/store/app/main.py @@ -7,16 +7,10 @@ app = FastAPI() -# FRONTEND_DIR = (Path(__file__).parent / "frontend").resolve() -# if not (FRONTEND_BUILD_DIR := FRONTEND_DIR / "build").exists(): -# raise FileNotFoundError(f"Frontend is not built to {FRONTEND_BUILD_DIR}") +FRONTEND_DIR = (Path(__file__).parent / "frontend").resolve() +if not (FRONTEND_BUILD_DIR := FRONTEND_DIR / "build").exists(): + raise FileNotFoundError(f"Frontend is not built to {FRONTEND_BUILD_DIR}") # Mounts the static frontend files to the /static path. -# app.mount("/", StaticFiles(directory=FRONTEND_BUILD_DIR, html=True), name="static") - -@app.get("/") -def read_root(): - return {"Hello": "World"} - -application = app # For WSGI compatibility +app.mount("/", StaticFiles(directory=FRONTEND_BUILD_DIR, html=True), name="static")