Name | Method | URL | Protected |
---|---|---|---|
List | GET |
/articles |
✘ |
Create | POST |
/articles |
✓ |
Get | GET |
/articles/{id} |
✘ |
Update | PUT/PATCH |
/articles/{id} |
✓ |
Delete | DELETE |
/articles/{id} |
✓ |
Rate | POST |
/articles/{id}/rating |
✘ |
Search | GET |
/articles/search/{query} |
✘ |
Login | POST |
/auth/login |
|
Register | POST |
/auth/register |
For more details check the /public/docs/index.html
inside the project directory.
These instructions will get you a copy of the project up and running on your local machine.
Install Docker - A step by step guide on how to install Docker on your OS will be on their official website.
Git clone the repo using the following command
git clone https://github.com/ladaposamuel/green-leaf-api
CD into the project directory and run the following commands
docker-compose build && docker-compose up -d
this command will fire up the project's docker images, it might take a while so watch some Youtube as you wait.
Create a .env
file
cp .env.example .env
NOTE: prefilled for the test
Access the API endpoints using your local IP or current IP address.
Example : http://localhost
To run the tests run
docker-compose exec greanleaf php vendor/bin/codecept run api
- PHP - The programming language used
- Lumen - The web framework used
- Codeception - Testing framework
- Docker
- Samuel Ladapo - Initial work - Samuel ladapo