Skip to content

DEFRA/ivory-services

Repository files navigation

Ivory API Service

Digital service to support the Ivory Act.

(Please note that this service is best installed through ivory)

Build Status Known Vulnerabilities Code Climate Test Coverage

Development Team

This module was developed by the Ivory team as part of a digital transformation project at DEFRA, a department of the UK government

Purpose

This service is part of a suite of services and modules working together to allow self registration of ivory items as required by the ivory act.

Prerequisites

Please make sure the following are installed:

Check that your environment is running the correct versions of node and npm:

$ npm --version
6.13.4
$ node --version
v10.18.1

Installation

Clone the repository and install its package dependencies:

git clone https://github.com/DEFRA/ivory-services.git && cd ivory-services
npm install

Setting up .env

Copy the .env.example file to .env and set it up for your environment

cp .env.example .env

Running the app

Make sure instances of redis and postgres are running and accessible

Run the app using npm

npm start

Unit testing the app

Use the following npm task. This runs the StandardJS linting as well as the unit tests to produce a coverage.html report

npm test

API Documentation using Swagger

Swagger can be accessed in the path "/documentation"

Contributing to this project

If you have an idea you'd like to contribute please log an issue.

All contributions should be submitted via a pull request.

License

THIS INFORMATION IS LICENSED UNDER THE CONDITIONS OF THE OPEN GOVERNMENT LICENCE found at:

http://www.nationalarchives.gov.uk/doc/open-government-licence/version/3

The following attribution statement MUST be cited in your products and applications when using this information.

Contains public sector information licensed under the Open Government license v3

About the license

The Open Government Licence (OGL) was developed by the Controller of Her Majesty's Stationery Office (HMSO) to enable information providers in the public sector to license the use and re-use of their information under a common open licence.

It is designed to encourage use and re-use of information freely and flexibly, with only a few conditions.

Environment Variables

The required environment variables for local development can be found in the .env.example file.