Author: GitHub Dunglas/Mercure
Article: Symfony Blog Article
Recommendation: Symfony Component Recommendation
- Require Docker & Docker Compose
- Run
make startto up/build Mercure & PHP containers - Run
make stopto stop/down all containers
http://localhost:8080/ = Server PHP
http://localhost:3000/ = Server Mercure
- Go to https://jwt.io/
- In PAYLOAD, paste
{
"mercure": {
"publish": ["*"]
}
}- In VERIFY SIGNATURE, replace
your-256-bit-secretbymyVerySecretKey - In Encoded, get token
eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJtZXJjdXJlIjp7InB1Ymxpc2giOlsiKiJdfX0.OixxclMTzRaafcsI3hP8MnpIf9v_RqQzmvSygxizYJ0
- In header, add a Bearer Tocken and copy/paste the above token
- in body, add a form-urlencoded and paste:
| key | value |
|---|---|
| topic | http://localhost:8080/ping |
| data | 0 |