from fastapi import FastAPI | |
from fastapi.responses import HTMLResponse | |
app = FastAPI() | |
def home(): | |
html_content = open('index.html').read() | |
return HTMLResponse(content=html_content, status_code=200) | |
def hello(): | |
return {"hello": "world"} | |
def greet(name): | |
return {"greeting": f"Hello {name}!"} | |