⚠️ Work in progress so keep calm. The good news: this is maintained!
- php ^7.4 || ^8.0
- symfony ^5.0
git clone https://github.com/jul6art/symfony-api-skeleton.git
Download the [https://github.com/dunglas/mercure/releases/tag/v0.3.3](mercure hub) depending on your operating system and install it in the root of your project. For each release, the assets section list operating systems implementations. The folder must contain the mercure bin. Rename this folder mercure.
mkdir -p config/jwt
openssl genpkey -out config/jwt/private.pem -aes256 -algorithm rsa -pkeyopt rsa_keygen_bits:4096
openssl pkey -in config/jwt/private.pem -out config/jwt/public.pem -pubout
The default token is signed with the secret key: !ChangeMe!
CORS_ALLOW_ORIGIN is the client URL and port. It can be * or a list of domains ADDR is the server ur and 3000 is the port for mercure server
JWT_KEY='symfony_app_secret_mercure_key' ADDR='localhost:3000' ALLOW_ANONYMOUS=1 CORS_ALLOWED_ORIGINS="http://admin.autobuyer.localhost" ./mercure/mercure
cd symfony-api-skeleton
symfony server:start
jane_admin : kitten tom_admin : kitten john_user : kitten
The Symfony API Skeleton is open-sourced software licensed under the MIT license.
© 2023 dev in the hood