Skip to content

Commit 704e39a

Browse files
committed
minor symfony#14732 [Mercure] Update docs for v0.11 (dunglas)
This PR was squashed before being merged into the 4.4 branch. Discussion ---------- [Mercure] Update docs for v0.11 The configuration changed in the upcoming version 0.11 (currently in beta). Commits ------- 465da94 [Mercure] Update docs for v0.11
2 parents 8379ea8 + 465da94 commit 704e39a

File tree

1 file changed

+15
-5
lines changed

1 file changed

+15
-5
lines changed

mercure.rst

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -68,11 +68,20 @@ clients.
6868
An official and open source (AGPL) implementation of a Hub can be downloaded
6969
as a static binary from `Mercure.rocks`_.
7070

71-
Run the following command to start it:
71+
If you use `Symfony Docker`_,
72+
a Mercure Hub is already included and you can skip straight to the next section.
7273

73-
.. code-block:: terminal
74+
On Linux and Mac, run the following command to start it:
75+
76+
.. rst-class:: command-linux
77+
78+
$ SERVER_NAME=:3000 MERCURE_PUBLISHER_JWT_KEY="!ChangeMe!" MERCURE_SUBSCRIBER_JWT_KEY="!ChangeMe!" ./mercure run -config Caddyfile.dev
79+
80+
On Windows run:
81+
82+
.. rst-class: command-windows
7483
75-
$ ./mercure --jwt-key='!ChangeMe!' --addr='localhost:3000' --allow-anonymous --cors-allowed-origins='*'
84+
> $env:SERVER_NAME=':3000'; $env:MERCURE_PUBLISHER_JWT_KEY='!ChangeMe!'; $env:MERCURE_SUBSCRIBER_JWT_KEY='!ChangeMe!'; .\mercure.exe run -config Caddyfile.dev
7685
7786
.. note::
7887

@@ -175,8 +184,8 @@ the **topic** being updated. This topic should be an `IRI`_
175184
of the resource being dispatched.
176185

177186
Usually, this parameter contains the original URL of the resource
178-
transmitted to the client, but it can be any valid `IRI`_, it doesn't
179-
have to be a URL that exists (similarly to XML namespaces).
187+
transmitted to the client, but it can be any string or `IRI`_,
188+
and it doesn't have to be a URL that exists (similarly to XML namespaces).
180189

181190
The second parameter of the constructor is the content of the update.
182191
It can be anything, stored in any format.
@@ -630,6 +639,7 @@ Enable the panel in your configuration, as follows:
630639
.. _`high-level implementations`: https://mercure.rocks/docs/ecosystem/awesome
631640
.. _`In this recording`: https://www.youtube.com/watch?v=UI1l0JOjLeI
632641
.. _`Mercure.rocks`: https://mercure.rocks
642+
.. _`Symfony Docker`: https://github.com/dunglas/symfony-docker/
633643
.. _`API Platform distribution`: https://api-platform.com/docs/distribution/
634644
.. _`JSON Web Token`: https://tools.ietf.org/html/rfc7519
635645
.. _`example JWT`: https://jwt.io/#debugger-io?token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJtZXJjdXJlIjp7InB1Ymxpc2giOlsiKiJdfX0.iHLdpAEjX4BqCsHJEegxRmO-Y6sMxXwNATrQyRNt3GY

0 commit comments

Comments
 (0)