/flask-boilerplate

A boilerplate Flask RESTful API

Primary LanguagePython

flask-boilerplate

Local run

flask --app web run
# or
FLASK_APP=web flask run

Lint

ruff check .

Deploy

synchronize: Gunicorn async: Hypercorn/uvcorn

pip install "uvicorn[standard]" gunicorn

Note: on MacOS. Run this command to fix gunicorn error

export NO_PROXY=*
hypercorn web:asgi_app

uvicorn web:asgi_app --host 0.0.0.0 --port 80

gunicorn web:asgi_app --workers 4 --worker-class uvicorn.workers.UvicornWorker --bind 0.0.0.0:80