From 49eda104aad2371ae080b8764bdbc324de858e0c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mat=C3=BA=C5=A1=20Ferech?= Date: Tue, 16 Oct 2018 09:55:05 +0200 Subject: [PATCH] gunicorn: add page (#2424) --- pages/linux/gunicorn.md | 27 +++++++++++++++++++++++++++ pages/osx/gunicorn.md | 27 +++++++++++++++++++++++++++ 2 files changed, 54 insertions(+) create mode 100644 pages/linux/gunicorn.md create mode 100644 pages/osx/gunicorn.md diff --git a/pages/linux/gunicorn.md b/pages/linux/gunicorn.md new file mode 100644 index 0000000000..eaeaa68d83 --- /dev/null +++ b/pages/linux/gunicorn.md @@ -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}}` diff --git a/pages/osx/gunicorn.md b/pages/osx/gunicorn.md new file mode 100644 index 0000000000..eaeaa68d83 --- /dev/null +++ b/pages/osx/gunicorn.md @@ -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}}`