link
fastapi/run-prod

Run Production Server

Start production server

production
server

Command

uvicorn main:app --workers 4

Examples

Run with 4 workers

uvicorn main:app --workers 4

Use Gunicorn with Uvicorn workers

gunicorn -w 4 -k uvicorn.workers.UvicornWorker main:app