From 3a7b788e35b9d979322b8aa56e4165c5713f80bb Mon Sep 17 00:00:00 2001 From: Tommy Stanton Date: Thu, 16 Jan 2014 14:05:05 -0800 Subject: [PATCH 1/2] [doc] The store for File is empty if non-existent --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index c0b6815..02457c0 100644 --- a/README.md +++ b/README.md @@ -220,6 +220,8 @@ Based on the Memory store, but provides additional methods `.save()` and `.load( The file store is also extensible for multiple file formats, defaulting to `JSON`. To use a custom format, simply pass a format object to the `.use()` method. This object must have `.parse()` and `.stringify()` methods just like the native `JSON` object. +If the file does not exist at the provided path, the store will simply be empty. + ### Redis There is a separate Redis-based store available through [nconf-redis][0]. To install and use this store simply: From 79b9b84300ba0204d2d4a3a01eda411f7986f305 Mon Sep 17 00:00:00 2001 From: Tommy Stanton Date: Thu, 16 Jan 2014 14:12:10 -0800 Subject: [PATCH 2/2] [doc] Add a Literal example to add() --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 02457c0..9fc2dd1 100644 --- a/README.md +++ b/README.md @@ -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: ``` js + nconf.add('supplied', { type: 'literal', store: { 'some': 'config' }); nconf.add('user', { type: 'file', file: '/path/to/userconf.json' }); nconf.add('global', { type: 'file', file: '/path/to/globalconf.json' }); ```