Tag : mercure

in my Symfony project I am using Mercury. Currently, locally, to launch Mercury, I use the following command: ./mercure/mercure –jwt-key=’mySecretKey’ –addr=’localhost:3000′ –allow-anonymous –cors-allowed-origins=’*’ So, I’m using the port 3000 of my localhost : localhost:3000. But how am I supposed to do it once in production? To test elsewhere than locally, I used ngrok, which allows ..

Read more

I use Symfony 5.1.*. I get this terrible bug, I don’t know what’s happen, I waste my day for nothing, if any one know something to save my carrier in programming. #.env MERCURE_PUBLISH_URL=http://localhost:3000/.well-known/mercure/ #config/packages/mercure.yaml mercure: enable_profiler: ‘%kernel.debug%’ hubs: default: url: http://localhost:3000/.well-known/mercure/ jwt: ‘%env(MERCURE_JWT_TOKEN)%’ I run the command ./mercure –jwt-key=’!ChangeMe!’ –addr=’localhost:3000′ –allow-anonymous –cors-allowed-origins=’http://localhost:8000′ Source: Symfony..

Read more

I have been following This documentation page, I wanted to learn to use Mercure in Symfony and everything went fine until I reached the "Authorization" part. I have a Mercure hub running with the following command bin/mercure.exe –jwt-algorithm=’HS256′ –jwt-key=’konshensx’ –addr=’localhost:3000′ –allow-anonymous –cors-allowed-origins=’https://localhost:8000′ I have an endpoint to send test updates. I setted the third parameter ..

Read more

Here is the error message : Argument 1 passed to AppControllerPublisherController::index() must be an instance of SymfonyComponentMercurePublisher, instance of SymfonyComponentMercureDebugTraceablePublisher given, called in /home/gw01/Etna/PLI/vendor/symfony/http-kernel/HttpKernel.php on line 145 (500 Internal Server Error) PublisherController : <?php namespace AppController; use SymfonyBundleFrameworkBundleControllerAbstractController; use SymfonyComponentHttpFoundationRequest; use SymfonyComponentHttpFoundationResponse; use SymfonyComponentMercurePublisher; use SymfonyComponentMercureUpdate; use SymfonyComponentRoutingAnnotationRoute; /** * Class PublisherController * @package AppController ..

Read more