Skip to content

talbinet/settings.json

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

Super simple, environment aware, JSON settings reader for NodeJS

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%