From 6c05b9cccbf8c0c0a0e3debdc602a0708f565fd8 Mon Sep 17 00:00:00 2001 From: Wolfgang Müller Date: Fri, 14 Feb 2025 12:44:34 +0100 Subject: docs: Update ASGI server instructions to include uvicorn-worker Uvicorn will be deprecating the built-in uvicon.workers module sometime in the future [1] and recommends using uvicorn-worker instead. Follow suit and point this out in the documentation as well. [1] https://github.com/encode/uvicorn/pull/2302 --- docs/setup.rst | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'docs/setup.rst') diff --git a/docs/setup.rst b/docs/setup.rst index d8962f3..51ec383 100644 --- a/docs/setup.rst +++ b/docs/setup.rst @@ -100,13 +100,14 @@ Starting the web application ---------------------------- To serve the web application, you need a compatible ASGI server. We recommend -`gunicorn `_. The endpoint for the web application is the -``app()`` factory in ``hircine.app``: +`gunicorn `_ together with `uvicorn-worker +`_. The endpoint for the web +application is the ``app()`` factory in ``hircine.app``: .. code-block:: console - (.venv) $ python -m pip install gunicorn - (.venv) $ gunicorn -k uvicorn.workers.UvicornWorker --bind localhost:8000 "hircine.app:app()" + (.venv) $ python -m pip install gunicorn uvicorn-worker + (.venv) $ gunicorn -k uvicorn_worker.UvicornWorker --bind localhost:8000 "hircine.app:app()" Now you can point your browser to http://localhost:8000 to open the web application. To stop it, simply terminate ``gunicorn`` or the ASGI server of -- cgit v1.2.3-2-gb3c3