We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 22210fd commit 41917f7Copy full SHA for 41917f7
3 files changed
server/web/app.py
@@ -4,8 +4,17 @@
4
The database for the frontend is going to save the charts and equations
5
"""
6
7
-from fastapi import FastAPI
+from fastapi import FastAPI, Request
8
from fastapi.staticfiles import StaticFiles
9
+from fastapi.templating import Jinja2Templates
10
+from starlette.responses import HTMLResponse
11
12
app = FastAPI()
13
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
0 commit comments