From 22577ba81099330d55a19d207d2097d6fa778c06 Mon Sep 17 00:00:00 2001 From: Giorgio Vilardo <56472600+giorgiovilardo@users.noreply.github.com> Date: Fri, 24 Jul 2020 22:00:36 +0200 Subject: [PATCH] uvicorn: add page (#4217) --- pages/common/uvicorn.md | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 pages/common/uvicorn.md diff --git a/pages/common/uvicorn.md b/pages/common/uvicorn.md new file mode 100644 index 000000000..a3518c164 --- /dev/null +++ b/pages/common/uvicorn.md @@ -0,0 +1,24 @@ +# uvicorn + +> Python ASGI HTTP Server, for asynchronous projects. +> More information: . + +- Run Python web app: + +`uvicorn {{import.path:app_object}}` + +- Listen on port 8080 on localhost: + +`uvicorn --host {{localhost}} --port {{8080}} {{import.path:app_object}}` + +- Turn on live reload: + +`uvicorn --reload {{import.path:app_object}}` + +- Use 4 worker processes for handling requests: + +`uvicorn --workers {{4}} {{import.path:app_object}}` + +- Run app over HTTPS: + +`uvicorn --ssl-certfile {{cert.pem}} --ssl-keyfile {{key.pem}} {{import.path:app_object}}`