first commit

This commit is contained in:
2025-04-13 19:23:12 -03:00
commit 278d0cfaf2
3 changed files with 18 additions and 0 deletions

1
Procfile Normal file
View File

@@ -0,0 +1 @@
web: uvicorn app:app --host=0.0.0.0 --port=80

15
app.py Normal file
View File

@@ -0,0 +1,15 @@
from typing import Union
from fastapi import FastAPI
app = FastAPI()
@app.get("/")
def read_root():
return {"Hello": "World"}
@app.get("/items/{item_id}")
def read_item(item_id: int, q: Union[str, None] = None):
return {"item_id": item_id, "q": q}

2
requirements.txt Normal file
View File

@@ -0,0 +1,2 @@
fastapi
uvicorn[standard]