@app.get("/", include_in_schema=False) async def index(): return FileResponse("static/index.html") @app.get("/{page}", include_in_schema=False) async def page(page: str): import os safe = page.replace("/", "") path = f"static/{safe}.html" if os.path.exists(path): return FileResponse(path) return JSONResponse({"error": "not found"}, status_code=404)