From cd2112d467aba9411cdcc87b50401ded7633ab13 Mon Sep 17 00:00:00 2001 From: wizarot Date: Tue, 26 Feb 2019 11:13:29 +0800 Subject: [PATCH] gunicorn: add Chinese translation --- pages.zh/osx/gunicorn.md | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 pages.zh/osx/gunicorn.md diff --git a/pages.zh/osx/gunicorn.md b/pages.zh/osx/gunicorn.md new file mode 100644 index 0000000000..7762b3f1a9 --- /dev/null +++ b/pages.zh/osx/gunicorn.md @@ -0,0 +1,27 @@ +# gunicorn + +> Python 的 WSGI http服务器. + +- 运行python web应用程序: + +`gunicorn {{导入路径:应用程序}}` + +- 在localhost上监听8080端口: + +`gunicorn --bind {{localhost}}:{{8080}} {{导入路径:应用程序}}` + +- 启用实时自动加载: + +`gunicorn --reload {{导入路径:应用程序}}` + +- 使用4个工作进程处理请求: + +`gunicorn --workers {{4}} {{导入路径:应用程序}}` + +- 使用4个工作线程处理请求: + +`gunicorn --threads {{4}} {{导入路径:应用程序}}` + +- 通过https运行应用程序: + +`gunicorn --certfile {{cert.pem}} --keyfile {{key.pem}} {{导入路径:应用程序}}`