figr

0.0.3 • Public • Published

figr

Autobootstrap your config. Looks for $CWD/config and loads the config files into a config object.

Installation

npm install figr

File Tree

- /config
--- all.js
--- development.json
--- production.js
--- staging.json
--- test.js

e.g. NODE_ENV=development would result in a merge of all's exports object and the development object. i.e. you can use module.exports or a JSON file.

API

var figr = require('figr');
var config = figr();

You can also pass in a configurable object (i.e. supports #get and #set)

e.g.

var express = require('express'),
    app = express(),
    figr = require('figr'),
    config = figr(app);
 
console.log(config.someProp == app.get('someProp'); //true

Readme

Keywords

Package Sidebar

Install

npm i figr

Weekly Downloads

1

Version

0.0.3

License

MIT

Last publish

Collaborators

  • matchdav