mirror of
https://github.com/tldr-pages/tldr.git
synced 2025-07-25 17:35:36 +02:00
gunicorn: add page (#2424)
This commit is contained in:
parent
15c3f9ec7a
commit
49eda104aa
2 changed files with 54 additions and 0 deletions
27
pages/linux/gunicorn.md
Normal file
27
pages/linux/gunicorn.md
Normal file
|
@ -0,0 +1,27 @@
|
|||
# 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}}`
|
27
pages/osx/gunicorn.md
Normal file
27
pages/osx/gunicorn.md
Normal file
|
@ -0,0 +1,27 @@
|
|||
# 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}}`
|
Loading…
Add table
Reference in a new issue