Skip to content

sadikkuzu/fastapi-heroku

Repository files navigation

fastapi-heroku

pre-commit.ci status

Development

pip install -qUr requirements-dev.txt
pre-commit install
pre-commit run --all-files
uvicorn main:app --reload

Local Run

docker-compose up --build -d

http://localhost:8000/docs

Deployment

Heroku

Stable case

Deploy to Heroku

source codes
requirements.txt main.py Procfile
fastapi
uvicorn
from fastapi import FastAPI

app = FastAPI()

@app.get('/')
def get_root():
    return {'message': 'this is the root message'}
web: uvicorn main:app --host=0.0.0.0 --port=${PORT:-5000}

Missing uvicorn case

Deploy to Heroku

source codes
requirements.txt main.py Procfile
fastapi
from fastapi import FastAPI

app = FastAPI()

@app.get('/')
def get_root():
    return {'message': 'this is the root message'}
web: uvicorn main:app --host=0.0.0.0 --port=${PORT:-5000}

Requierements typo case

Deploy to Heroku

source codes
requierements.txt main.py Procfile
fastapi
uvicorn
from fastapi import FastAPI

app = FastAPI()

@app.get('/')
def get_root():
    return {'message': 'this is the root message'}
web: uvicorn main:app --host=0.0.0.0 --port=${PORT:-5000}

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Sponsor this project

 

Packages

No packages published

Contributors 3

  •  
  •  
  •