Skip to content

jul6art/symfony-api-skeleton

Repository files navigation

logo dev in the hood

Version

SYMFONY-API-SKELETON

Symfony Application

⚠️ Work in progress so keep calm. The good news: this is maintained!

Requirements

  • php ^7.4 || ^8.0
  • symfony ^5.0

Installation

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.

Generate the JWT Token

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

Start mercure server

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

Start server

cd symfony-api-skeleton
symfony server:start

DEV user accounts

jane_admin : kitten tom_admin : kitten john_user : kitten

License

The Symfony API Skeleton is open-sourced software licensed under the MIT license.

© 2023 dev in the hood

About

Symfony API skeleton

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published