maomao88 commited on
Commit
b95bf00
·
1 Parent(s): 199524d

update app.py

Browse files
backend/__pycache__/app.cpython-313.pyc CHANGED
Binary files a/backend/__pycache__/app.cpython-313.pyc and b/backend/__pycache__/app.cpython-313.pyc differ
 
backend/app.py CHANGED
@@ -16,9 +16,10 @@ app.add_middleware(
16
  allow_headers=["Content-Type", "Authorization"], # only required headers
17
  )
18
 
19
- frontend_path = Path(__file__).parent.parent / "frontend" / "dist"
20
- app.mount("/", StaticFiles(directory=frontend_path, html=True), name="frontend")
21
-
22
  @app.get("/api/hello")
23
  def greet_json():
24
  return {"Hello": "World!"}
 
 
 
 
 
16
  allow_headers=["Content-Type", "Authorization"], # only required headers
17
  )
18
 
 
 
 
19
  @app.get("/api/hello")
20
  def greet_json():
21
  return {"Hello": "World!"}
22
+
23
+ # Serve frontend build under / (but exclude /api)
24
+ frontend_path = Path(__file__).parent.parent / "frontend" / "dist"
25
+ app.mount("/", StaticFiles(directory=frontend_path, html=True), name="frontend")