This server has a single Endpoint that consumes a third party API The Movie Database, and retrieves the Marvel actors who performed more than one character.
- Jest for testing
- Eslint for code linting
- Nodemon for live reloading the server on development
- Node-cache for caching API responses
Node v16.14.0 Npm v8.3.1
npm install
npm run dev
npm test
Run tests and show test coverage:
npm run test:coverage
npm run lint
Important
In order to run the project properly it is necessary to SET the environment variable MOVIE_DATABASE_API_KEY
, It must contain a valid api_key we use to query TheMovieDatabase API.
export MOVIE_DATABASE_API_KEY=<valid_movie_database_api_key>
The server requires Node.js v16.* to be installed.
-
Clone this repository.
-
In the root directory, run
npm install
to install all dependencies. -
Run
npm start
which should start the server in cluster mode. -
The server is ready and listening for incoming requests on port
7000
.
- URL:
https://localhost:7000/
curl --request GET \
--url 'https://localhost:7000/actorsWithMultipleCharacters' \
--header 'Content-Type: application/json;charset=utf-8'