Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/fijimunkii/nconf-encrypted
Encrypted wrapper around nconf
https://github.com/fijimunkii/nconf-encrypted
argv config configuration decrypt encrypt encrypted env environment json key nconf secure security
Last synced: 26 days ago
JSON representation
Encrypted wrapper around nconf
- Host: GitHub
- URL: https://github.com/fijimunkii/nconf-encrypted
- Owner: fijimunkii
- License: isc
- Created: 2019-02-01T18:30:36.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2019-07-16T13:28:18.000Z (over 5 years ago)
- Last Synced: 2025-01-07T14:04:40.314Z (30 days ago)
- Topics: argv, config, configuration, decrypt, encrypt, encrypted, env, environment, json, key, nconf, secure, security
- Language: JavaScript
- Homepage:
- Size: 20.5 KB
- Stars: 3
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# nconf-encrypted
Keep your secrets safe![![License: ISC](https://img.shields.io/npm/l/real-user-agent.svg)](https://opensource.org/licenses/ISC)
Encrypted wrapper around nconf.
```js
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](LICENSE.txt) file for details.