Skip to content

Latest commit

 

History

History
57 lines (44 loc) · 1.17 KB

installation.md

File metadata and controls

57 lines (44 loc) · 1.17 KB

Project 7 - Create a web service exposing an API

This project was realized for my PHP/Symfony developer training at Openclassrooms.

Requirements

To be sure that the project will install successfully, you need to have :

- PHP 8.1
- Composer 2.3.4
- Git
- Prefer a computer based on Unix OS (Linux or Macos)

Installation

  1. First, clone the project :
git clone [email protected]:davy-beauzil/p7-api.git
cd p7-api
  1. Create .env.local file from .env file and adapt your database configuration (DATABASE_URL)

  2. Install composer dependencies

composer install
  1. Initialize database
php bin/console doctrine:database:create
php bin/console doctrine:schema:create
  1. Generate public and private keys for the LexikJWTAuthenticationBundle
php bin/console lexik:jwt:generate-keypair
php bin/console lexik:jwt:generate-keypair --env=test
  1. Load fixtures
php bin/console doctrine:fixtures:load
  1. You can now run this command and access to the documentation on http://localhost:8000/api/doc
symfony serve

Run tests

You can run test with :

vendor/bin/phpunit