0.0.15 • Published 9 years ago

config-weaver v0.0.15

Weekly downloads
3
License
MIT
Repository
github
Last release
9 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

9 years ago

0.0.14

9 years ago

0.0.13

9 years ago

0.0.12

9 years ago

0.0.11

10 years ago

0.0.10

10 years ago

0.0.9

10 years ago

0.0.8

10 years ago