from fastapi import FastAPI from fastapi.staticfiles import StaticFiles from fastapi.responses import FileResponse app = FastAPI() app.mount("/", StaticFiles(directory="app/build", html=True), name="static") @app.get("/") def index() -> FileResponse: return FileResponse(path="/app/build/index.html", media_type="text/html")