Home > database >  How to setup both frameworks Symfony and Angular at the same time?
How to setup both frameworks Symfony and Angular at the same time?

Time:12-09

This is probably a stupid question but somehow I still need an answer anywhere so here I go : I want to develop a project using both Symfony and Angular and I have no idea how to set these two up (when I start a project with either of these it creates a new directory and everything, I don't know how to combine the two). And how do I compile the project? Do I compile with the command for Symfony? For Angular? Both?

CodePudding user response:

Personaly I used 2 separate projects.

  • An Angular project managed with the Angular CLI and the ng command
  • A Symfony project managed by flex and the Symfony CLI command or a docker-compose

I think ng serve is enough to develop with Angular. For the server side, a docker-composer with php, nginx, mysql/postgres do the job.

My approach is to take the Angular application as a separate entity. On one side, I have the PHP API and the backend for administration. On the other side, I have the Angular app for web client and eventually an iOS/android app for mobile client.

  • Related