
Product
Announcing Socket Fix 2.0
Socket Fix 2.0 brings targeted CVE remediation, smarter upgrade planning, and broader ecosystem support to help developers get to zero alerts.
A complex configuration library that you should only use if you want to do things that can't be solved by all the simpler hierarchical json configuration libraries like nconf.
This will load configuration from the following sources, with the later files over-riding any values set in the earlier ones (think of it as getting more specfic as you go down the list).
So by specifying the majority of your configuration in ./config/default.json, you can then override the defaults in the environment or host specific sections using one or more of the other config locations.
{ a: ['a', 'b'] }
+
{ a: ['c'] }
->
{ a: ['c', 'b'] }
, new behaviour: { a: ['a', 'b'] }
+
{ a: ['c'] }
->
{ a: ['c'] }
Any of the config files can also specify additional files to be loaded after it. This is expressed by setting CF_additionalFiles
field.
{
"key": "value",
"CF_additionalFiles": ["../config.json", "/etc/app/pass.json"]
}
The config object is returned as a simple JSON object. Just access the properties you need.
var Conflab = require('conflab');
var conflab = new Conflab();
conflab.load(function(err, config) {
app.listen(config.server.port, config.service.host);
});
Conflab expects an options object which can provide defaults and/or overrides. The defaults can be overriden by any other configuration values stated in files, argv or override. The overrides override any other configuration value.
{
config:{
key1: 'value1',
key2: 'value2',
},
overrides: {
key2: 'value3',
},
}
FAQs
A configuration library that probably does more than it should.
We found that conflab demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Socket Fix 2.0 brings targeted CVE remediation, smarter upgrade planning, and broader ecosystem support to help developers get to zero alerts.
Security News
Socket CEO Feross Aboukhadijeh joins Risky Business Weekly to unpack recent npm phishing attacks, their limited impact, and the risks if attackers get smarter.
Product
Socket’s new Tier 1 Reachability filters out up to 80% of irrelevant CVEs, so security teams can focus on the vulnerabilities that matter.