Skip to content

najmi9/mercure

Repository files navigation

Usefull Commands

docker compose up -d
composer install
yarn install
yarn build
symfony console doctrine:database:create
symfony console doctrine:schema:update
symfony serve -d
symfony console messenger:consumer async

How it works?

  • PublishTokenProvider::getJwt() provider used by the mercure bundle to create a signed JWT with key MERCURE_PUBLISHER_JWT_KEY, is used by the bundle to push updates to the mercure server.

  • SubscriptionTokenProvider::getJwt() provider used to generate programmatically JWT tokens signed by the key MERCURE_SUBSCRIBER_JWT_KEY, this token is used on the client side to subscribe to private updates.

  • I used the Symfony Messenger component to dispatch the Mercure Update asynchronously, so you need to run the worker:

        symfony console messenger:consumer async -vv

    To consume the messages.

About

Mercure Symfony Private Updates

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published