This project aims to create multiple projects with symfony using a single Kenerl and Console. In this demo there is an api and a frontal but you could add all you want.
- PHP 7
- Symfony 4
- Symfony Cache Pools
- Guzzle
- PHPSTAN
- PHP CS FIXER
- Create a virtual Symfony Kernel
- Single Console instance for all projects
- Multiple configurations
- Use this project for any purpose
- Tests
This project require PHP 7 to run.
Install the dependencies and devDependencies and start the server.
$ git clone https://github.com/patrice-blp/symfony4-multiple-projets.git
$ cd symfony4-multiple-projets
$ composer install
Run with this command By default ./bin/console will run frontal APP
$ APP_NAME=frontal ./bin/console s:r or ./bin/console s:r
$ APP_NAME=api ./bin/console s:r 0.0.0.0:9090
And for another projects
$ APP_NAME=projectName ./bin/console s:r
You can use Postman or any another tool to add a default user
http://localhost:9090/api/v1/user
username=ANY_USERNAME
passord=YOU_PASSWORD
role=ROLE_ADMIN
To get user yo can make a following request
http://localhost:9090/api/v1/user/anyUserName
You can use Env variable APP_NAME to avoid writing this on the console
For production environments you can follow instructions here Symfony deploy
Want to contribute? Great!
Please read this Contributing
Open your favorite IDE and start coding.
MIT
Free Software, Hell Yeah!