emb-rep / FastAPI /app /main.py
abadesalex's picture
test no static
51c67cb
raw
history blame
332 Bytes
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")