Код: Выделить всё
static/
assets/
index-lATvXaZG.js
index.html
app.py
Код: Выделить всё
app = FastAPI()
app.mount("/static", StaticFiles(directory="static"), name="react")
@app.get("")
@app.get("/")
@app.get("/index.html")
def serve_index():
return FileResponse("static/index.html")
Есть ли настройка, которую я могу поместить в свое приложение React (или, возможно, в моей настройке Fastapi), чтобы подготовить пути?
Подробнее здесь: https://stackoverflow.com/questions/795 ... om-fastapi