@involves/stage-lib
v0.0.27
Published
[![Build status](https://badge.buildkite.com/7bf909b0a666bf842a5731d57b03df07e51414afd3be2dfc80.svg)](https://buildkite.com/involves/nodejs-lib-stage) [![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=involvestecnologia_stag
Downloads
37
Readme
@involves/stage-lib
Install
npm install @involves/stage-lib --save
Example usage
Using Stage in Node.js:
const {
ProductService,
PointOfSaleService
} = require('@involves/stage-lib')
async function run() {
const product = await ProductService.get(
{
tenant: 'homologacao',
project: 1,
id: 99
}
)
const pointOfSale = await PointOfSaleService.get(
{
tenant: 'homologacao',
project: 1,
id: 10
}
)
}
run()
How to run the tests
At the terminal, just type the command:
make test
Extra configuration
ENVs
STAGE_LIB_STAGE_BASE_URL
default https://{tenant}.involves.comSTAGE_LIB_STAGE_TIMEOUT
default 60000STAGE_LIB_STAGE_API_USER_PROVIDER_URL
default https://stage-api-user-provider.involvesapp.comSTAGE_LIB_STAGE_API_USER_PROVIDER_TIMEOUT
default 10000STAGE_LIB_STAGE_API_USER_PROVIDER_CACHE_TOKEN_TTL_IN_SECONDS
default 300