Seventh project of the OpenClassrooms PHP application developer path
This project consists of setting up an API in order to provide all platforms that wish it with access to the BileMo product catalog. The API must be made in PHP using the Symfony framework and must follow the rules of Level 1, 2 and 3 of the Richardson Maturity Model.
Before you can download the project you must first have a PHP version at least >=7.4 with openssl extension, a recent version of Composer and the Symfony CLI.
To set up the project, follow the steps below:
-
Clone the repository
-
Move your current directory to the root of the project
-
Perform the command:
composer install
-
Create a new file
.env.local
in order to configure the DSN for the database.DATABASE_URL=mysql://db_user:[email protected]:3306/db_name
-
Then you have to set up the database, associated tables and fixtures with the following commands:
php bin/console doctrine:database:create php bin/console doctrine:migrations:migrate php bin/console doctrine:fixtures:load
-
Henceforth, you need to generate the SSL keys for JWT authentication:
php bin/console lexik:jwt:generate-keypair
-
Finally, you can launch the Symfony server with the following command:
symfony serve
And it's done !