Map Colonies Heartbeat Management Service


badge-alerts-lgtm

grade-badge-lgtm

snyk


Service info

This service is heartbeat server used to log the last heartbeat for worker of a specific task. A list of tasks that didn't received new heartbeat pulse for specified duration can then be retrieved and used by other services

API

Checkout the OpenAPI spec here

Installation

Install deps with npm

npm install

Run Locally

Clone the project

git clone https://github.com/MapColonies/heartbeat-manager

Go to the project directory

cd heartbeat-manager

Install dependencies

npm install

Start the server

npm run start

Running Tests

To run tests, run the following command

npm run test

To only run unit tests:

npm run test:unit

To only run integration tests:

npm run test:integration

Running Migration Docker

To run the migration docker run the following command:

 docker run -it -e DB_USER=postgres  -e DB_PASSWORD=1234 -e DB_NAME=postgres -e DB_TYPE=postgres -e DB_HOST=localhost -e DB_PORT=5432 -e DB_SCHEMA=HeartbeatManager --rm --network host migration-image:vtag