Skip to content

mojaloop/als-msisdn-oracle-svc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

46 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ALS MSISDN Oracle (Work in Progress)

Code is based on the Mojaloop ALS Consent Oracle

Setup

Clone repo

git clone git@github.com:mojaloop/als-msisdn-oracle-svc.git

Improve local DNS resolver

Add the 127.0.0.1 als-msisdn-oracle-svc.local entry in your /etc/hosts so the als-msisdn-oracle-svc is reachable on http://als-msisdn-oracle-svc.local:3000. Elsewhere use http://localhost:3000

Install service dependencies

cd als-msisdn-oracle-svc
npm ci

Run local dockerized als-msisdn-oracle-svc

npm run docker:build
npm run docker:run

To check the als-msisdn-oracle-svc health visit http://als-msisdn-oracle-svc.local:3000/health

File structure of docker image

dist
│
└───config (Mount your default.json config file here)
└───migrations
└───seeds
└───src
└───package.json
logs
node_modules
package-lock.json
package.json (Run package commands with root package.json)

Run locally with database in docker-compose

docker-compose up -d mysql
npm run migrate
npm run start

Updating the OpenApi (Swagger) Spec

We use multi-file-swagger to make our swagger files more manageable.

After making changes to the .yaml files in ./src/interface/, update the swagger.json file like so:

    npm run build:openapi

Note: We will likely want to move to swagger 3.0 at some point, and once we do, we will be able to use the common api snippets library to factor out common Mojaloop snippets. Keep track of #352 - Update to OpenAPI v3

Auditing Dependencies

We use audit-ci along with npm audit to check dependencies for node vulnerabilities, and keep track of resolved dependencies with an audit-ci.jsonc file.

To start a new resolution process, run:

npm run audit:fix

You can then check to see if the CI will pass based on the current dependencies with:

npm run audit:check

The audit-ci.jsonc contains any audit-exceptions that cannot be fixed to ensure that CircleCI will build correctly.

About

EXPERIMENTAL: An oracle service for MSISDN party type

Resources

License

Stars

Watchers

Forks

Packages

No packages published