Description: This is a fastify api that handles one POST request.
This api will take the year and then do a series of lookups:
- Find all of the most popular movies of the year
- Find all of the editors for those movies
- Combine the responses into a simple JSON response
- Super fast node api built on Fastify
- Promise.all for batching movie requests
- In memory filtering for Editors
- API key loading from .env file
For this project to work you will need to create a .env file with the following
HTTP_PORT=3001
API_TOKEN={{ Your MovieDB token }}
To run the unit tests
npm run test:jest
To start the project
npm run build
npm run start
The app can be further tested using the included .http file or with this curl command
curl -X POST --location "http://localhost:3001" \
-H "Content-Type: application/json" \
-d '{
"year": 2003
}'
The payload/body of the post should look like this:
{
"year": 2003
}