nconf-encrypted

1.0.4 • Public • Published

nconf-encrypted

Keep your secrets safe!

License: ISC

Encrypted wrapper around nconf.

const nconf = require('nconf-encrypted');
 
nconf
  .argv()
  .env()
  .use('someConfigFile', { type: 'file', file: '/path/to/config.json' })
  .use('moreConfig', { type: 'literal', store: { a: 'OK', b: true } });
 
// retrieve value
nconf.get('a'); // 'OK'
nconf.get('b'); // true
 
// view all stores (note all keys and values are now encrypted)
nconf.get();
 
// optionally bring your own encryption key
nconf.setEncryptionKey(`32CharacterString`);
 
// Extra trick to prevent rogue modules from leaking / dumping environment variables
process.argv = [];
process.env = {};

Authors

fijimunkii

License

This project is licensed under the ISC License - see the LICENSE file for details.

Package Sidebar

Install

npm i nconf-encrypted

Weekly Downloads

2

Version

1.0.4

License

ISC

Unpacked Size

11.1 kB

Total Files

7

Last publish

Collaborators

  • fijimunkii