2.0.0 • Published 5 years ago

roe-plugin-apollo-env v2.0.0

Weekly downloads
2
License
MIT
Repository
github
Last release
5 years ago

Build Status Coverage

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