Skip to content

Commit 41917f7

Browse files
committed
fix(web): home page not rendering
1 parent 22210fd commit 41917f7

3 files changed

Lines changed: 847 additions & 668 deletions

File tree

server/web/app.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,17 @@
44
The database for the frontend is going to save the charts and equations
55
"""
66

7-
from fastapi import FastAPI
7+
from fastapi import FastAPI, Request
88
from fastapi.staticfiles import StaticFiles
9+
from fastapi.templating import Jinja2Templates
10+
from starlette.responses import HTMLResponse
911

1012
app = FastAPI()
1113
app.mount("/static", StaticFiles(directory="./server/web/static"), name="static")
14+
templates = Jinja2Templates(directory="./server/web/templates")
15+
16+
17+
# Serve the main dashboard page
18+
@app.get("/", response_class=HTMLResponse)
19+
async def index(request: Request):
20+
return templates.TemplateResponse("index.html", {"request": request})

server/web/routers.py

Lines changed: 0 additions & 17 deletions
This file was deleted.

0 commit comments

Comments
 (0)