g2-ops-config
v0.0.26
Published
To fetch and maintain cloud configs for different projects
Downloads
50
Keywords
Readme
g2-ops-config
Goal
Centralized support for Cloud Config for Copart
API
- Standard API
import fetchConfigurations from 'g2-ops-config'
fetchConfigurations(APPLICATION, [PROFILE1, PROFILE2]).then((response) => console.log(response))
// Will Print
{
[PROFILE1]: {}, // configurations for PROFILE1
[PROFILE2]: {} // configurations for PROFILE1
}
- We will inject configurations into process when configuration begins with
ENV-
// application.yaml
ENV:
SESSION_ID = 'secret'
BABEL_ENV = 'development'
import fetchConfigurations from 'g2-ops-config'
fetchConfigurations(APPLICATION, [PROFILE1, PROFILE2]).then((response) => console.log(response))
// Will Print
{
[PROFILE1]: {}, // configurations for PROFILE1
[PROFILE2]: {} // configurations for PROFILE1
}
// And also things are available on process
console.log(process.env.SESSION_ID) // should print 'secret'
console.log(process.env.BABEL_ENV) // should print 'development'
ISSUES
Please, report issues at: g2-ops-config