A zero-dependency repackaging of the official MongoDB driver v2.2.16 for Node.js. Originally published in 2016, this package is archived and no longer maintained. It was created to strip out dependencies from the mongodb npm package, but it lags far behind the official driver (current major version is 6) and lacks security updates, modern features like transactions, and TypeScript types. Not recommended for new projects; use the official mongodb or mongoose package instead.
npm install mongodb-minimalNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Connect to a MongoDB instance, insert a document, and close the connection using the legacy callback pattern.
Migrate to the official mongodb package (v3+ for drivers, v6+ recommended).
Wrap in a Promise or use a library like `bluebird` to promisify. Prefer mongodb v3+ which supports promises.
Use official mongodb package which ships type definitions.
Switch to the maintained mongodb npm package.
Run `npm install mongodb-minimal` and ensure the module name is correct.
Start MongoDB service: `mongod --dbpath /data/db`.
Use `const { MongoClient } = require('mongodb-minimal');` instead of `import`.