hypercorn.txt 1.1 KB

123456789101112131415161718192021222324252627282930313233343536
  1. ================================
  2. How to use Django with Hypercorn
  3. ================================
  4. .. highlight:: bash
  5. Hypercorn_ is an ASGI server that supports HTTP/1, HTTP/2, and HTTP/3
  6. with an emphasis on protocol support.
  7. Installing Hypercorn
  8. ====================
  9. You can install Hypercorn with ``pip``::
  10. python -m pip install hypercorn
  11. Running Django in Hypercorn
  12. ===========================
  13. When Hypercorn is installed, a ``hypercorn`` command is available
  14. which runs ASGI applications. Hypercorn needs to be called with the
  15. location of a module containing an ASGI application object, followed
  16. by what the application is called (separated by a colon).
  17. For a typical Django project, invoking Hypercorn would look like::
  18. hypercorn myproject.asgi:application
  19. This will start one process listening on ``127.0.0.1:8000``. It
  20. requires that your project be on the Python path; to ensure that run
  21. this command from the same directory as your ``manage.py`` file.
  22. For more advanced usage, please read the `Hypercorn documentation
  23. <Hypercorn_>`_.
  24. .. _Hypercorn: https://pgjones.gitlab.io/hypercorn/