Skip to content

Instantly share code, notes, and snippets.

@coderarity
Created September 23, 2012 21:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save coderarity/a644301e0e8c39593b8f to your computer and use it in GitHub Desktop.
Save coderarity/a644301e0e8c39593b8f to your computer and use it in GitHub Desktop.
var nconf = require('nconf');
nconf.add('configfile', { type: 'file', file: __dirname+'/configfile.json' });
nconf.stores['configfile'].save(function (err) {
if (err) return console.error(err);
// config saved to ./configfile.json successfully
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment