mirror of
https://github.com/django/daphne.git
synced 2024-11-21 23:46:33 +03:00
updated README with an example of endpoint string usage
This commit is contained in:
parent
c3585c463b
commit
ea399ecc1b
13
README.rst
13
README.rst
|
@ -3,7 +3,7 @@ daphne
|
||||||
|
|
||||||
.. image:: https://api.travis-ci.org/andrewgodwin/daphne.svg
|
.. image:: https://api.travis-ci.org/andrewgodwin/daphne.svg
|
||||||
:target: https://travis-ci.org/andrewgodwin/daphne
|
:target: https://travis-ci.org/andrewgodwin/daphne
|
||||||
|
|
||||||
.. image:: https://img.shields.io/pypi/v/daphne.svg
|
.. image:: https://img.shields.io/pypi/v/daphne.svg
|
||||||
:target: https://pypi.python.org/pypi/daphne
|
:target: https://pypi.python.org/pypi/daphne
|
||||||
|
|
||||||
|
@ -37,6 +37,17 @@ To achieve this you can use the --fd flag::
|
||||||
|
|
||||||
daphne --fd 5 django_project.asgi:channel_layer
|
daphne --fd 5 django_project.asgi:channel_layer
|
||||||
|
|
||||||
|
|
||||||
|
If you want more control over the port/socket bindings you can fall back to
|
||||||
|
using `twisted's endpoint description strings
|
||||||
|
<http://twistedmatrix.com/documents/current/api/twisted.internet.endpoints.html#serverFromString>`_
|
||||||
|
by using the `--endpoint (-e)` flag, which can be used multiple times.
|
||||||
|
This line would start a SSL server on port 443, assuming that `key.pem` and `crt.pem`
|
||||||
|
exist in the current directory (requires pyopenssl to be installed)::
|
||||||
|
|
||||||
|
daphne -e ssl:443:privateKey=key.pem:certKey=crt.pem django_project.asgi:channel_layer
|
||||||
|
|
||||||
|
|
||||||
To see all available command line options run daphne with the *-h* flag.
|
To see all available command line options run daphne with the *-h* flag.
|
||||||
|
|
||||||
Root Path (SCRIPT_NAME)
|
Root Path (SCRIPT_NAME)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user