config-server-client

1.1.0 • Public • Published

config-server-client

license

npm downloads

An npm package to get configurations from a Spring Cloud Config Server and transforms to env vars.

Table of Contents

Install

npm:

npm i -s config-server-client

Usage

const  ConfigServerClient = require('config-server-client');
 
  
 
console.log(configServerClient.loadSync());
 
// script

Options

Item Description Default
config.server.url The endpoint of the Spring Cloud Config Server process.env.CONFIG_SERVER_URL
config.server.auth An optional Authorization Header to send (e.g Basic xpto=) process.env.CONFIG_SERVER_AUTH
env Environment (e.g development, test, production) process.env.CONFIG_SERVER_ENV or process.env.NODE_ENV
application.name Application name (e.g myAwesomeApp) process.env.CONFIG_SERVER_APP
prefix One prefix to use in resulted env name (eg process.env.VUE_APP_ (none)
stringify Indicate if needs to JSON.stringify contents (usually to webpack) false

Contributors

Name
Hermógenes Ferreira

License

MIT © Hermógenes Ferreira

Package Sidebar

Install

npm i config-server-client

Weekly Downloads

7

Version

1.1.0

License

MIT

Unpacked Size

11.7 kB

Total Files

10

Last publish

Collaborators

  • hermogenes