Skip to content

Commit

Permalink
format
Browse files Browse the repository at this point in the history
  • Loading branch information
codekansas committed May 21, 2024
1 parent 38de37f commit 37ff706
Showing 1 changed file with 4 additions and 10 deletions.
14 changes: 4 additions & 10 deletions store/app/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")

0 comments on commit 37ff706

Please sign in to comment.