roe-plugin-apollo-env
v2.0.0
Published
Roe plugin to apply configurations from Ctrip's apollo config service to process.env
Downloads
8
Maintainers
Readme
roe-plugin-apollo-env
Roe plugin to apply configurations from Ctrip's apollo config service to process.env
Install
$ npm i roe-plugin-apollo-env
Usage
roe.config.js
const ApolloEnvPlugin = require('roe-plugin-apollo-env')
module.exports = {
plugins: [
new ApolloEnvPlugin({
host: process.env.APOLLO_HOST,
appId: 'my-app',
namespace: 'application',
envs: {
REDIS_HOST: 'redis.host',
REDIS_PORT: {
key: 'redis.port',
namespace: 'common'
}
}
})
],
...
}
License
MIT