BileMoAPI is a Symfony API application with api-platform
git clone [email protected]:kdefarge/BileMoAPI.git
cd BileMoAPI
composer install
# Config database
# MariaDB (dont forget version X.X.X with your version)
DATABASE_URL="mysql://USER:PASSWRD@SERVER:PORT/DB_NAME?serverVersion=mariadb-X.X.X"
# Doctrine can create the DB_NAME database for you
php bin/console doctrine:database:create
# Create database schema
php bin/console doctrine:schema:create
You need OpenSLL and run this command to generate the SSL keys
php bin/console lexik:jwt:generate-keypair
Update jwt config in your .env
###> lexik/jwt-authentication-bundle ###
JWT_SECRET_KEY=%kernel.project_dir%/config/jwt/private.pem
JWT_PUBLIC_KEY=%kernel.project_dir%/config/jwt/public.pem
JWT_PASSPHRASE=b11c0ae29c7f88b75d5e71281f38ac69
###< lexik/jwt-authentication-bundle ###
cd BileMoAPI
symfony server:start
Open your browser and navigate to http://localhost:8000/. If everything is working, you’ll see a welcome page. Later, when you are finished working, stop the server by pressing Ctrl+C from your terminal.
To access the API documentation navigate to https://localhost:8000/docs
# load all the 'dev' fixtures
php bin/console hautelook:fixtures:load
<!-- phpunit.xml.dist -->
<server name="SYMFONY_PHPUNIT_VERSION" value="9.5.4" />
php bin/phpunit
php bin/phpunit --filter testLoginJWT
php bin/phpunit --filter testMobile
php bin/phpunit --filter testCustumer
php bin/phpunit --filter testUsers
php bin/phpunit --filter testCommands
Update .env.test and DATABASE_URL then create the database with schema
php bin/console doctrine:database:create --env=test
php bin/console doctrine:schema:create --env=test
MIT © Kévin DEFARGE