A lightweight MongoDB client wrapper for Node.js that simplifies CRUD operations with a class-based ClientDB interface. Version 1.7.71 provides methods like insert, read, update, delete, find, and storage stats. It uses environment variables for connection and requires dotenv. Differentiators include a minimal API surface, built-in connection management, and no dependency on Mongoose. Release cadence is irregular.
npm install afridho-mongodbNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Create a ClientDB instance, insert a document, read all documents, then close the connection.
Use require('afridho-mongodb') instead of import.Create .env file with MONGODB_URI and DB_NAME, or set process.env variables before using ClientDB.
Pass a simple string like 'users', not 'db.users' or '/users'.
Pass data as { $set: { age: 30 } } instead of { age: 30 }.Use const ClientDB = require('afridho-mongodb');Ensure .env file exists with MONGODB_URI and DB_NAME.