This service is responsible for returning urls of movie poster images for a specific IMDb id
. It acts as a middleware and talks directly to https://www.omdbapi.com/. From there it fetches the poster-url and returns it.
Directory | Description |
---|---|
src/index.js |
Main entry point for the HTTP server, it uses the kwiz-utils library for validation |
test |
e2e testing with jest |
This service depends on the following:
- GitHub Access Token that can read packages (
read:packages
) - API key for www.omdbapi.com (
.env
file created from.env.template
)
As we are using a library provided by our organization kwiz-utils
. For npm to find the package, do the following:
- Login to Github Package Registry using
npm login --registry=https://npm.pkg.github.com
and your credentials. Any provided access token will need at least therepo
andread:packages
scope.
After that, npm install
should run without any problems.
- create a
.env
file based on.env.template
- add an
API-KEY
for https://www.omdbapi.com/ (you can create one here)- the
API-KEY
is already set on GitHub for the actions
- the
npm run dev
This will start the micro HTTP service on PORT 3002.
Please consult the wiki for the API documentation and examples.
To execute all tests, run the following command:
npm run test