0.0.15 • Published 10 years ago

config-weaver v0.0.15

Weekly downloads
3
License
MIT
Repository
github
Last release
10 years ago

Config Weaver

A simple module to support overriding config files using environment variables.

Getting Started

Install this grunt plugin next to your project's Gruntfile.js with:

npm install config-weaver --save-dev

Then add this line to your project's Gruntfile.js gruntfile:

grunt.loadNpmTasks('config-weaver');

Documentation

  • the root of the client project should contain a config file named config.yaml This file should be a valid YAML file containing at least an application.name plus any values that need to be externalised an under the control of infrastructure, for example:
application:
  name: myproj     
database:
  connectionString: jdbc:postgresql://hostname:5432/dbname
  • Values can be overridden via environment variables, for example:
     myproj_database_connectionString=jdbc:postgresql://hostname/newdbname
  • The following code allows you to access the effective config:
var conf = require('config-weaver').config();
  • This grunt task will log what the effective config would be if the application is run:
grunt show-effective-config
0.0.15

10 years ago

0.0.14

10 years ago

0.0.13

10 years ago

0.0.12

10 years ago

0.0.11

11 years ago

0.0.10

11 years ago

0.0.9

11 years ago

0.0.8

11 years ago