The official MongoDB adapter for JSData, a Node.js ORM. Version 2.0.0 is the current stable release, requiring js-data@3, mongodb@3+, and bson@3+. It provides a seamless integration between JSData and MongoDB, supporting all JSData CRUD operations and query features. Key differentiators include full TypeScript type definitions, adherence to JSData's adapter contract, and support for MongoDB connection URIs. The adapter follows a moderate release cadence with patch releases for bug fixes.
npm install js-data-mongodbNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows how to initialize the MongoDB adapter, register it with JSData, define a mapper, and perform create and findAll operations.
Upgrade js-data to 3.x and ensure all peer dependencies are met.
Install mongodb@3 or higher.
Use `mapper.create(data)` instead of `mapper.createRecord(data)`.
Use a different adapter or implement custom transaction handling.
Ensure MongoDB URI is correct and the adapter is registered before performing operations.
Start MongoDB service or check connection URI.
Run `npm install bson@3`.