From 51de8cad8975c59d0dc9be6951263d27b8b2aa6c Mon Sep 17 00:00:00 2001 From: Adam Kariv Date: Mon, 11 Nov 2024 13:18:43 +0200 Subject: [PATCH] Fix static hosting --- odds/api/server.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/odds/api/server.py b/odds/api/server.py index 0fa456e..b15c881 100644 --- a/odds/api/server.py +++ b/odds/api/server.py @@ -24,9 +24,6 @@ allow_headers=["*"], ) -# Serve static files from the 'ui' directory on the '/' endpoint -app.mount("/", StaticFiles(directory="ui", html=True), name="static") - @app.get("/datasets") async def search_datasets_handler(query: str) -> List[Dict[str, Any]]: return await search_datasets(query, None) @@ -47,5 +44,8 @@ async def query_db_handler(resource_id: str, sql: str) -> Optional[Dict[str, Any async def answer_handler(q: str, catalog_id: Optional[str] = None) -> Optional[Dict[str, Any]]: return await answer_question(q, catalog_id) +# Serve static files from the 'ui' directory on the '/' endpoint +app.mount("/", StaticFiles(directory="ui", html=True), name="static") + # Run the server with: # uvicorn server:app --reload