Netflakes is an assessment test from busha to consume and expose movie apis from [https://swapi.dev/api](https://swapi.dev/api)
. The project is built using the ports and adapters pattern. This enables the components of the application to easily be replaced given that such components adhere to the specified interfaces.
BASE_URL: https://netflakes.herokuapp.com
Fetch Movies - GET
/api/movies
Add Comment - POST
/api/movies/:movie_id/add-comment
Request Body Sample
{ "body”: “This is a sample comment for testing purposes only….”, “created_by”: “Teej4y” }
Get Movie Comments - GET
/api/movies/:movie_id/comments
Get Movie Characters - GET
/api/movies/:movie_id/characters?sort_by=<height | gender | name>,order=<asc | desc>,filter_by_gender=<male | female>
RUNNING THE PROJECT
To run the project on docker in a local environment, you would need to set the environment variables below as part of the docker env when creating the container using the -e
flag.
If the project, is ran locally, then an app.env
file is needed to store the environment variables.
DB_HOST=localhost
DB_PORT=5432
DB_USER=teej4y
DB_PASSWORD=password
DB_NAME=netflakes
DB_URL="postgresql://root:secret@localhost:5432/netflakes?sslmode=disable"
REDIS_HOST=localhost
REDIS_PORT=6379
REDIS_PASSWORD=password
[ ] More test cases needs to be written to cover all or most of the functionalites [ ] Performance Metrics and evaluations could be added