commands.sh

gunicorn

all

Python WSGI HTTP Server.

More info →

Options (2)

-b, --bindboolean

Listen on port 8080 on localhost

Example: gunicorn {{[-b|--bind]}} {{localhost}}:{{8080}} {{import.path:app_object}}
-w, --workersboolean

Use 4 worker processes for handling requests

Example: gunicorn {{[-w|--workers]}} {{4}} {{import.path:app_object}}

Examples (6)

Run Python web app

gunicorn import.path:app_object

Listen on port 8080 on localhost

gunicorn [-b|--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 [-w|--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
made by @shridhargupta | data from tldr-pages