MongoDB extension for cascade-config that adds a `.mongodb()` loader to read configuration objects from MongoDB collections using variable substitution in URL, db, collection, and _id fields. Current stable version is 1.2.1. Release cadence is low, primarily maintenance updates. Key differentiator: seamlessly integrates with cascade-config's hierarchical config system and supports environment variable expansion in all connection parameters. Deprecated in favor of newer versions requiring cascade-config >=1.9.0 (since v1.2.0). Only works with MongoDB driver v3 connection strings.
npm install cascade-config-mongodbNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Demonstrates how to augment cascade-config with the MongoDB loader, create a config hierarchy with an inline object and MongoDB source, then execute .done() to retrieve the merged config.
Update cascade-config to 1.9.0 or later, or stick with an older version of this package.
Ensure only one version of cascade-config and cascade-config-mongodb is installed. Use npm dedupe if necessary.
Clone the document or read _id manually before passing to cascade-config.
Use const CC_mongodb = require('cascade-config-mongodb'); and ensure the package is in node_modules.Install mongodb driver v3: npm install mongodb@3
Check mongodb URL and ensure MongoDB is accessible. Use a valid connection string like 'mongodb://localhost:27017'.