Subito MongoDB connector is a TypeScript library, currently at v0.12.2, providing a wrapper around the official MongoDB Node.js driver with a focus on subito microservices architecture. It offers a simplified interface for database operations, connection management, and transaction support. The package is released on npm and is designed for server-side (Node.js) environments. It differs from raw mongodb usage by abstracting connection handling, providing built-in health checks, and integrating with the Subito ecosystem. Active development with monthly releases.
npm install subito-connector-mongodbNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows connecting to MongoDB, inserting a document, and closing connection using SubitoMongo class.
Replace 'SubitoMongo(config)' with 'new SubitoMongo(config)'.
Replace db.close() with db.disconnect().
Use import statements or dynamic import() in CommonJS modules.
Update Node.js to v14 or later.
For >=0.10.0, use 'new SubitoMongo(config)'. Ensure you are using import or dynamic import.
Use import statement or use dynamic import: const SubitoMongo = await import('subito-connector-mongodb')Ensure URI includes username/password and optionally set authSource: 'admin' in config.