1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2025-04-29 23:24:55 +02:00
tldr/pages/linux/gunicorn.md
2018-10-16 08:55:05 +01:00

27 lines
593 B
Markdown

# gunicorn
> Python WSGI HTTP Server.
- Run Python web app:
`gunicorn {{import.path:app_object}}`
- Listen on port 8080 on localhost:
`gunicorn --bind {{localhost}}:{{8080}} {{import.path:app_object}}`
- Turn on live reload:
`gunicorn --reload {{import.path:app_object}}`
- Use 4 worker processes for handling requests:
`gunicorn --workers {{4}} {{import.path:app_object}}`
- Use 4 worker threads for handling requests:
`gunicorn --threads {{4}} {{import.path:app_object}}`
- Run app over HTTPS:
`gunicorn --certfile {{cert.pem}} --keyfile {{key.pem}} {{import.path:app_object}}`