Spaces:
Sleeping
Sleeping
File size: 551 Bytes
10e8a0c |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
from fastapi import FastAPI
from fastapi.staticfiles import StaticFiles
from fastapi.templating import Jinja2Templates
from fastapi.requests import Request
from endpoints import router
app = FastAPI()
# Serve static files (CSS, JS)
app.mount("/static", StaticFiles(directory="static"), name="static")
# Serve HTML templates
templates = Jinja2Templates(directory="templates")
@app.get("/")
def home(request: Request):
return templates.TemplateResponse("index.html", {"request": request})
# Include your API endpoints
app.include_router(router) |