This commit is contained in:
Saifeddine ALOUI
2024-01-01 03:01:51 +01:00
parent 327d375e19
commit 99fd4cd53b
6 changed files with 67 additions and 4 deletions

View File

@ -46,6 +46,8 @@ async def serve_index(request: Request, full_path: Path):
return FileResponse(root_path/"scripts/python/lollms_installer/frontend/dist"/full_path, media_type="application/javascript")
if str(full_path).endswith(".css"):
return FileResponse(root_path/"scripts/python/lollms_installer/frontend/dist"/full_path)
if str(full_path).endswith(".html"):
return FileResponse(root_path/"scripts/python/lollms_installer/frontend/dist"/full_path)
return FileResponse(root_path/"scripts/python/lollms_installer/frontend/dist/index.html")
app.mount("/", StaticFiles(directory=root_path/"scripts/python/lollms_installer/frontend/dist"), name="static")