Skip to content

Commit 9be73ea

Browse files
committed
refactor(web/app)🔧: Refactor static file path resolution
- Change static directory mounting to use dynamic path resolution.
1 parent 3155a7e commit 9be73ea

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

‎llamabot/web/app.py‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,11 @@ def create_app(db_path: Optional[Path] = None):
3737
Base.metadata.create_all(engine)
3838
upgrade_database(engine)
3939

40-
app.mount("/static", StaticFiles(directory="llamabot/web/static"), name="static")
40+
app.mount(
41+
"/static",
42+
StaticFiles(directory=Path(__file__).parent / "static"),
43+
name="static",
44+
)
4145

4246
@app.get("/", response_class=HTMLResponse)
4347
async def root(request: Request):

‎pixi.lock‎

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)