0.2.0 • Published 8 years ago

settings.json v0.2.0

Weekly downloads
63
License
-
Repository
github
Last release
8 years ago

settings.json

Super simple, environment aware, JSON settings reader for NodeJS.

Build Status

Installation

npm install settings.json

Get started

var settings = require('settings.json')(__dirname + '/config/settings.json', 'development');

Usage

require('settings.json')(<input> [, <environment> [, <options>]])

<input>           One or many paths for settings file(s). Files are loaded in specified order
                  and overlapping settings from the previous file will be overridden with the ones
                  from latter one.
                  
<environment>     Environment to select from the settings, defaults to "production".

<options>         Object with additional options. Supported options:

                  options.quiet:
                      
                      Do not throw if file doesn't exist or it's content is invalid JSON. Defaults to false.

Examples

Check out tests.

0.2.0

8 years ago

0.1.2

9 years ago

0.1.1

10 years ago

0.1.0

10 years ago