File size: 332 Bytes
5ebef9c
 
51c67cb
5ebef9c
 
51c67cb
5ebef9c
51c67cb
5ebef9c
 
51c67cb
 
1
2
3
4
5
6
7
8
9
10
11
12
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")