Skip to content

Application coded during this course: https://learn.web-develop.me/courses/developpement-moderne-avec-apiplatform-symfony-et-react. I deviated from the course quite a lot to add more features and explore server side rendering with Limenius/ReactBundle.

License

Notifications You must be signed in to change notification settings

thibaut-decherit/symfony-react-api-platform

Repository files navigation

Symfony 4 React API Platform

Application coded during this course.
I deviated from the course quite a lot to add more features and explore server side rendering with Limenius/ReactBundle.

Setup

Install dependencies

composer install yarn

Create .env.local (see .env.your_env.local.dist)

Customize all empty variables.

If you use MariaDB, DB_VERSION should start with mariadb- then the version number, else only specifying the version number should suffice.

Setup LexikJWTAuthenticationBundle

php bin/console lexik:jwt:generate-keypair

Setup database

php bin/console doctrine:database:create php bin/console doctrine:migration:migrate

Run in dev env

Run in dedicated terminals:

  • symfony server:start
  • yarn encore:dev
  • yarn encore:dev:serverside
  • node renderingExternalServer.js

Deployment

You may need to add export PATH=$PATH:/home/{user}/.nvm/versions/node/{version}/bin (replace {user} and {version}) to /etc/apache2/envvars, so the SSR bundle is able to run JS server side.

pm2 start renderingExternalServer.js --name symfony-react-api-platform-rendering pm2 save

About

Application coded during this course: https://learn.web-develop.me/courses/developpement-moderne-avec-apiplatform-symfony-et-react. I deviated from the course quite a lot to add more features and explore server side rendering with Limenius/ReactBundle.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published