I have built a simple test API with Python and FastAPI. I have uploaded it from my Mac to a GitHub repo and the to Heroku from the GitHub repo. The app uploaded to heroku successfully, but when I hit the run app button from the heroku I get an error with the following log:
023-08-30T15:01:14.617080+00:00 heroku[router]: at=error code=H14 desc="No web processes running" method=GET path="/" host=fastapi2-c3b7ae0b9b65.herokuapp.com request_id=0ab52f5a-a5dd-4fa3-bdae-03aa551d9320 fwd="24.61.26.166" dyno= connect= service= status=503 bytes= protocol=https
2023-08-30T15:01:18.710976+00:00 heroku[router]: at=error code=H14 desc="No web processes running" method=GET path="/favicon.ico" host=fastapi2-c3b7ae0b9b65.herokuapp.com request_id=71088a35-0404-40c9-9d7c-848c49047e40 fwd="24.61.26.166" dyno= connect= service= status=503 bytes= protocol=https
2023-08-30T15:02:07.311482+00:00 heroku[router]: at=error code=H14 desc="No web processes running" method=GET path="/" host=fastapi2-c3b7ae0b9b65.herokuapp.com request_id=cf018a05-5366-4880-8ad2-ce0da2168b4c fwd="24.61.26.166" dyno= connect= service= status=503 bytes= protocol=https
2023-08-30T15:02:07.396985+00:00 heroku[router]: at=error code=H14 desc="No web processes running" method=GET path="/favicon.ico" host=fastapi2-c3b7ae0b9b65.herokuapp.com request_id=37548ca8-57b9-45ef-9005-b88a7aac2b16 fwd="24.61.26.166" dyno= connect= service= status=503 bytes= protocol=https
2023-08-30T15:03:54.256027+00:00 heroku[router]: at=error code=H14 desc="No web processes running" method=GET path="/" host=fastapi2-c3b7ae0b9b65.herokuapp.com request_id=42e8fefa-15aa-4dc9-b65f-188bbf571666 fwd="24.61.26.166" dyno= connect= service= status=503 bytes= protocol=https
2023-08-30T15:03:54.319756+00:00 heroku[router]: at=error code=H14 desc="No web processes running" method=GET path="/favicon.ico" host=fastapi2-c3b7ae0b9b65.herokuapp.com request_id=b04d01f0-ccd7-47eb-8c50-d75863bf6227 fwd="24.61.26.166" dyno= connect= service= status=503 bytes= protocol=https
2023-08-30T15:26:12.676705+00:00 heroku[router]: at=error code=H14 desc="No web processes running" method=GET path="/" host=fastapi2-c3b7ae0b9b65.herokuapp.com request_id=67257eb9-3b2b-428c-9123-b60fdc5d64c7 fwd="24.61.26.166" dyno= connect= service= status=503 bytes= protocol=https
2023-08-30T15:26:12.757319+00:00 heroku[router]: at=error code=H14 desc="No web processes running" method=GET path="/favicon.ico" host=fastapi2-c3b7ae0b9b65.herokuapp.com request_id=81cb18cd-49a6-472d-a21d-0a8650cc4655 fwd="24.61.26.166" dyno= connect= service= status=503 bytes= protocol=https
2023-09-01T15:29:50.656345+00:00 heroku[router]: at=error code=H14 desc="No web processes running" method=GET path="/" host=fastapi2-c3b7ae0b9b65.herokuapp.com request_id=95aa9055-48fb-4921-996e-0f359c874421 fwd="24.61.26.166" dyno= connect= service= status=503 bytes= protocol=https
2023-09-01T15:29:50.826910+00:00 heroku[router]: at=error code=H14 desc="No web processes running" method=GET path="/favicon.ico" host=fastapi2-c3b7ae0b9b65.herokuapp.com request_id=3b0056eb-c41b-4857-b6b4-348c3e339fb2 fwd="24.61.26.166" dyno= connect= service= status=503 bytes= protocol=https
This is in my procfile: web: uvicorn main:app
This is in my Requirements.txt : fastapi~=0.103.0 pydantic~=2.3.0
How can I fix this? thanks