Skip to content

brooksdubois/MovieEditors

Repository files navigation

Movie Editors Coding Challenge

Description: This is a fastify api that handles one POST request.

This api will take the year and then do a series of lookups:

  1. Find all of the most popular movies of the year
  2. Find all of the editors for those movies
  3. Combine the responses into a simple JSON response

Features

  • Super fast node api built on Fastify
  • Promise.all for batching movie requests
  • In memory filtering for Editors
  • API key loading from .env file

NOTE:

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
}

About

A Coding challenge to find editors for movies

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published