You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: core/mercure.md
+4-21Lines changed: 4 additions & 21 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -16,26 +16,9 @@ Then, the Mercure hub dispatches the updates to all connected clients using [Ser
16
16
Mercure support is already installed, configured and enabled in [the API Platform distribution](../distribution/index.md).
17
17
If you use the distribution, you have nothing more to do, and you can skip to the next section.
18
18
19
-
If you have installed API Platform using another method (such as `composer require api`), you need to install a Mercure hub, and the [Symfony MercureBundle](https://symfony.com/doc/current/mercure.html):
19
+
If you have installed API Platform using another method (such as `composer require api`), you need to install [a Mercure hub](https://mercure.rocks/docs/getting-started) and the Symfony MercureBundle.
20
20
21
-
First, [download and run a Mercure hub](https://mercure.rocks/docs/hub/install).
22
-
Then, install the Symfony bundle:
23
-
24
-
```console
25
-
composer require symfony/mercure-bundle
26
-
```
27
-
28
-
Finally, 3 environment variables [must be set](https://symfony.com/doc/current/configuration.html#configuration-based-on-environment-variables):
29
-
30
-
*`MERCURE_URL`: the URL that must be used by API Platform to publish updates to your Mercure hub (can be an internal or a public URL)
31
-
*`MERCURE_PUBLIC_URL`: the **public** URL of the Mercure hub that clients will use to subscribe to updates
32
-
*`MERCURE_JWT_SECRET`: a valid Mercure [JSON Web Token (JWT)](https://jwt.io/) allowing API Platform to publish updates to the hub
33
-
34
-
The JWT **must** contain a `mercure.publish` property containing an array of topic selectors.
35
-
This array can be empty to allow publishing anonymous updates only. It can also be `["*"]` to allow publishing on every topics.
0 commit comments