Skip to content

Files

Latest commit

c63eddc · Mar 26, 2024

History

History

configuration

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
Feb 25, 2022
Nov 12, 2021
Jan 25, 2023
Apr 25, 2022
Feb 13, 2023
Nov 9, 2021
Nov 9, 2021
Jan 22, 2023
Feb 27, 2022
Jan 23, 2023
Mar 26, 2024
Mar 26, 2024
Jul 28, 2023
Jul 28, 2023
Sep 23, 2022
Jan 22, 2023

configuration

RPC 2.0 Microservice.
This microservice provides configuration for all other microservices. Single point for store configurations of microservices.

npm (scoped)
Docker
Docker prod
Docker staging
GitHub GitHub package.json dependency version (dev dep on branch)

Quality Gate Status Reliability Rating Security Rating Vulnerabilities Lines of Code Coverage

Navigation

ENVIRONMENTS:

  • MS_INIT_CONFIGS - JSON string for configure initial Config values. Default: []
  • MS_INIT_MIDDLEWARES - JSON string for configure initial Middleware values. Default: []
  • See full list COMMON ENVIRONMENTS

HOW TO RUN:

  1. Run Inverted Json job server.
docker run -it -p 8001:8001 lega911/ijson --log 47
  1. Run microservice (please, see ENVIRONMENTS above for understand config)
npm run start:dev
  1. Make some request
curl localhost:8001/ms/configuration -d '{"id": "unique-id", "method": "demo", "params": {}}'

If you use JetBrains IDE, try to find run configurations in .run

You can also install microservice like npm package:

npm i --save @lomray/microservice-configuration

HOW TO DEVELOP:

For develop this microservice, preferred use TDD technique. You can run all tests with watch flag or run one test:

// case 1
npm run test -- --watch

// case 2
NODE_ENV=tests TS_NODE_COMPILER_OPTIONS='{"target":"es6"}' mocha --harmony --no-warnings  __tests__/your-test-name.ts --require ts-node/register --recursive --watch

// check code coverage
nyc npm run test

That is all. Don't forget install npm dependencies (in root folder & local folder run: npm ci)

MEMORY USAGE:

AWS Memory: ~130 MB

Use CLI to start your own art.