FastAPI index.html 시작 페이지로 만들기
FastAPI index.html 시작 페이지로 만들기 index.html 파일을 기본 주소페이지에서 보여주고 싶은 경우 아래와 같이 처리합니다.from fastapi import FastAPIfrom fastapi.responses import FileResponsefastAPI = FastAPI() @fastAPI.get("/")def root(): return FileResponse('index.html');index.html 실행uvicorn main:fastAPI --port 8001 결과