ciyidogan commited on
Commit
f5884fa
·
verified ·
1 Parent(s): 212ea89

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -2
app.py CHANGED
@@ -29,11 +29,14 @@ app.include_router(chat_router)
29
  # ---------------- Admin API routes ----------------------------------
30
  app.include_router(admin_router)
31
 
 
32
  # ---------------- Serve Angular UI if exists ------------------------
33
  static_path = Path("static")
34
  if static_path.exists() and static_path.is_dir():
35
- # Serve static files (Angular assets)
36
- app.mount("/assets", StaticFiles(directory="static/assets"), name="assets")
 
 
37
 
38
  # Catch-all route for Angular routing (must be last!)
39
  @app.get("/{full_path:path}")
 
29
  # ---------------- Admin API routes ----------------------------------
30
  app.include_router(admin_router)
31
 
32
+
33
  # ---------------- Serve Angular UI if exists ------------------------
34
  static_path = Path("static")
35
  if static_path.exists() and static_path.is_dir():
36
+ # Serve static files (Angular assets) - only if assets directory exists
37
+ assets_path = static_path / "assets"
38
+ if assets_path.exists() and assets_path.is_dir():
39
+ app.mount("/assets", StaticFiles(directory=str(assets_path)), name="assets")
40
 
41
  # Catch-all route for Angular routing (must be last!)
42
  @app.get("/{full_path:path}")