[doc] Add a Literal example to add()

This commit is contained in:
Tommy Stanton 2014-01-16 14:12:10 -08:00
parent 3a7b788e35
commit 79b9b84300

View file

@ -121,6 +121,7 @@ The top-level of `nconf` is an instance of the `nconf.Provider` abstracts this a
Adds a new store with the specified `name` and `options`. If `options.type` is not set, then `name` will be used instead: Adds a new store with the specified `name` and `options`. If `options.type` is not set, then `name` will be used instead:
``` js ``` js
nconf.add('supplied', { type: 'literal', store: { 'some': 'config' });
nconf.add('user', { type: 'file', file: '/path/to/userconf.json' }); nconf.add('user', { type: 'file', file: '/path/to/userconf.json' });
nconf.add('global', { type: 'file', file: '/path/to/globalconf.json' }); nconf.add('global', { type: 'file', file: '/path/to/globalconf.json' });
``` ```