
Product
Introducing Socket Fix for Safe, Automated Dependency Upgrades
Automatically fix and test dependency updates with socket fix—a new CLI tool that turns CVE alerts into safe, automated upgrades.
nfs-config-resolver
Advanced tools
npm install nfs-config-resolver --save
Create configs
folder within your project directory
Create common.js
development.js
production.js
files inside configs
directory
// common.js
module.exports = {
"host":"localhost",
"port":80
};
prefix key with @
to allow a parameter to be overriden with environment parameter
// development.js
module.exports = {
"port":81,
"mongodb":{
"@host:MONGO_HOST": "localhost"
"@port:MONGO_PORT": "27017"
},
"@mode": "admin"
};
// production.js
module.exports = {
"port":82
};
You can override configuration with environment parameter
// run with environment NODE_ENV=development MONGO_HOST=182.166.12.2 MODE=customer
const config = require('nfs-config-resolver')();
console.log(config)
/*
{
"port":81,
"mongodb":{
"host": "182.166.12.2"
"port": "27017"
},
"mode": "customer"
}
*/
// run with environment NODE_ENV = production
const config = require('nfs-config-resolver')();
console.log(config.port)
// 82
FAQs
[](https://travis-ci.org/nodeframe/config-resolver) [](https://www.npmjs.com/package/nfs-config-resolver)
The npm package nfs-config-resolver receives a total of 28 weekly downloads. As such, nfs-config-resolver popularity was classified as not popular.
We found that nfs-config-resolver demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 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
Automatically fix and test dependency updates with socket fix—a new CLI tool that turns CVE alerts into safe, automated upgrades.
Security News
CISA denies CVE funding issues amid backlash over a new CVE foundation formed by board members, raising concerns about transparency and program governance.
Product
We’re excited to announce a powerful new capability in Socket: historical data and enhanced analytics.