An API of BileMo
This project has been developed under php 8.1 and symfony 6.1.
- Clone the GitHub repo:
git clone https://github.com/sebzz07/bileMoAPI.git
-
Go to the root of the project.
-
Create the folder
config/jwt/
-
Generate your private/public key with this two Openssl commands line :
php bin/console lexik:jwt:generate-keypair
setfacl -R -m u:www-data:rX -m u:"$(whoami)":rwX config/jwt
setfacl -dR -m u:www-data:rX -m u:"$(whoami)":rwX config/jwt
-
Create and fill out your own
.env.*
-
At the root of the project, install dependencies with composer:
composer install
- Create database and some fixtures via doctrine :
with the script :
composer initialize
or :
"symfony console doctrine:database:create",
"symfony console doctrine:schema:update --force",
"symfony console doctrine:fixtures:load -n"
- run local server :
symfony server:start -d
Now the project is normally deploy correctly
Your can check the documentation to understand the api and to test it :
https://localhost:8000/api/doc
You can use one of the nine accounts created with the fixtures or just
follow token's route : https://localhost:8000/api/login_check
emailofcompagny1@email.com//password
...
emailofcompagny9@email.com//password
You will find the token of your connection, copy it and click on the button "Authorize" at the top right of the page.
In the field "Value" type : bearer YourToken
.
Now your can use the API.
Thank you