@@ -68,11 +68,20 @@ clients.
68
68
An official and open source (AGPL) implementation of a Hub can be downloaded
69
69
as a static binary from `Mercure.rocks `_.
70
70
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.
72
73
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
74
83
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
76
85
77
86
.. note ::
78
87
@@ -175,8 +184,8 @@ the **topic** being updated. This topic should be an `IRI`_
175
184
of the resource being dispatched.
176
185
177
186
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).
180
189
181
190
The second parameter of the constructor is the content of the update.
182
191
It can be anything, stored in any format.
@@ -630,6 +639,7 @@ Enable the panel in your configuration, as follows:
630
639
.. _`high-level implementations` : https://mercure.rocks/docs/ecosystem/awesome
631
640
.. _`In this recording` : https://www.youtube.com/watch?v=UI1l0JOjLeI
632
641
.. _`Mercure.rocks` : https://mercure.rocks
642
+ .. _`Symfony Docker` : https://github.com/dunglas/symfony-docker/
633
643
.. _`API Platform distribution` : https://api-platform.com/docs/distribution/
634
644
.. _`JSON Web Token` : https://tools.ietf.org/html/rfc7519
635
645
.. _`example JWT` : https://jwt.io/#debugger-io?token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJtZXJjdXJlIjp7InB1Ymxpc2giOlsiKiJdfX0.iHLdpAEjX4BqCsHJEegxRmO-Y6sMxXwNATrQyRNt3GY
0 commit comments