
Security News
MCP Community Begins Work on Official MCP Metaregistry
The MCP community is launching an official registry to standardize AI tool discovery and let agents dynamically find and install MCP servers.
divideconfig
Advanced tools
npm install divideconfig --save
DivideConfig is smart loader for your application configuration. DivideConfig is load by mode configuration. Mode is to separate for distribution that are development, stage, production. See below configuration architecture.
config/
config.json
development.config.json
stage.config.json
production.config.json
|
+- database/
|
+- development.database.config.json
+- stage.database.config.json
+- production.database.config.json
+- oAuth2/
|
+- development.oauth2.config.json
+- stage.oauth2.config.json
+- production.oauth2.config.json
{
"mode": "development",
"default: "development"
}
{
"database": {
... your configuration
},
"oAuth2": {
... your configuration
}
}
DivideConfig is loading all configuration file in config directory, that is starts with mode prefix and xxxx.config.json file. If you set development mode, load all files that is start with "development". For example, "development.database.config.json" and "development.oauth2.config.json".
All loading task is to execute synchronous. So you try to load configuration before your application execute.
See configuration example,
var path = require('path');
var loader = require('../lib/Loader');
var configuration = loader.loading(path.join(__dirname, '../config/production_default_development'), 'config.json');
console.log(configuration);
See example in config directory and test/loader.js. I create example configuration and test case.
FAQs
Smart configuration loader by distribution configuration
We found that divideconfig demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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.
Security News
The MCP community is launching an official registry to standardize AI tool discovery and let agents dynamically find and install MCP servers.
Research
Security News
Socket uncovers an npm Trojan stealing crypto wallets and BullX credentials via obfuscated code and Telegram exfiltration.
Research
Security News
Malicious npm packages posing as developer tools target macOS Cursor IDE users, stealing credentials and modifying files to gain persistent backdoor access.