A dashboard to control metrics drivers.
First we need to define the URLs of the APIs in var.env
; a template can be found in var.env.example
.
Using docker:
docker-compose build
docker-compose up -d
Or manually:
npm install
npm run build
Using docker:
docker-compose -f docker-compose.dev.yml build
docker-compose -f docker-compose.dev.yml up -d
Or manually:
npm install
npm start
Tests are automatically run upon build, however they can also be run manually:
npm run test:all
In order to keep a consitent coding style, not just aesthetically, but also syntactically, two libraries are being used: eslint and prettier.
Both libraries can be run using lint-staged before a commit:
npm run precommit
Or individually:
npm run lint
npm run prettier
Eslint's configuration is defined in .eslintrc.js
, prettier's in .prettierrc
.
NB. For development purposes it is recommended to install all dependencies (npm install
) - husky will automatically configure a hook to trigger npm run precommit
automatically upon commit. However, the app should still be run in a container, to ensure that it works in an isolated environment.
The Metrics Broker is based in Ant Design Pro 2.0, a React UI library powered by UmiJS - in order to understand the architecture of the code it is recommended that you go through both documentations.