Skip to content

[Mercure] Update docs for v0.11 #14732

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 22, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 15 additions & 5 deletions mercure.rst
Original file line number Diff line number Diff line change
Expand Up @@ -68,11 +68,20 @@ clients.
An official and open source (AGPL) implementation of a Hub can be downloaded
as a static binary from `Mercure.rocks`_.

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

.. code-block:: terminal
On Linux and Mac, run the following command to start it:

.. rst-class:: command-linux

$ SERVER_NAME=:3000 MERCURE_PUBLISHER_JWT_KEY="!ChangeMe!" MERCURE_SUBSCRIBER_JWT_KEY="!ChangeMe!" ./mercure run -config Caddyfile.dev

On Windows run:

.. rst-class: command-windows

$ ./mercure --jwt-key='!ChangeMe!' --addr='localhost:3000' --allow-anonymous --cors-allowed-origins='*'
> $env:SERVER_NAME=':3000'; $env:MERCURE_PUBLISHER_JWT_KEY='!ChangeMe!'; $env:MERCURE_SUBSCRIBER_JWT_KEY='!ChangeMe!'; .\mercure.exe run -config Caddyfile.dev

.. note::

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

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

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