https://klg-user-rest-api.herokuapp.com/
- Symfony framework
- Doctrine ORM
- MySQL database
Make sure you download all the dependencies (packages) required for the technology and set up the databases! Below are instructions on how to do this:
- Clone or download project from https://github.com/KrasimiraGeorgieva/User-Rest-Api.git
- Go into the root directory of the project (where the bin folder resides)
- Make sure you’ve started your MySQL server (either from XAMPP or standalone)
- Open a shell / command prompt / PowerShell window in that directory (shift + right click --> open command window here)
- Enter the
php composer.phar install
orcomposer install
command to restore its Composer dependencies (described incomposer.json
)- In case you have composer globaly and enter command
composer install
you have to provide parameters from parameters.yml manual- database_port - press
Enter
- database_name - press
Enter
- database_root - press
Enter
- database_password - press
Enter
orenter the password
- mailer_transport - press
Enter
- mailer_host - press
Enter
- mailer_user - press
Enter
- mailer_password - press
Enter
- secret - press
Enter
- database_port - press
- In case you have composer globaly and enter command
- Enter the
php bin/console doctrine:database:create
command - Enter the
php bin/console doctrine:schema:update --force
command - Enter the
php bin/console server:run
(Windows OS) orphp bin/console server:start
(MAC OS) command - Done!
- Clone or download project from https://github.com/KrasimiraGeorgieva/User-Rest-Api.git
- Go into the root directory of the project (where the bin folder resides)
- Make sure you’ve started your MySQL server (either from XAMPP or standalone)
- Run
init-db.bat
file - for Windows OS - Done!
- Make sure you’ve started your MySQL server (either from XAMPP or standalone).
- Open a shell / command prompt / PowerShell window in that directory (shift + right click --> open command window here) from root directory of the project (where the bin folder resides)
- Enter
.\vendor\bin\phpunit
orvendor\bin\phpunit tests
command - Done!
The User API can be used by Postman app.
------------------------------------------------------------------------
|GET | /api/v1/users |Retrieves a list of users
|POST | /api/v1/users |Creates a new user
|GET | /api/v1/users/{id} |Retrieves a specific user by id
|PUT | /api/v1/users/{id} |Updates user by id
|DELETE | /api/v1/users/{id} |Deletes user by id
------------------------------------------------------------------------