MongoDB native adapter for the Moleculer DB service, version 0.5.0 as of the latest release. It provides schemaless MongoDB integration for Moleculer microservices, using MongoDB Node.js driver v3.0. Unlike Mongoose-based alternatives, this adapter does not enforce schemas, making it suitable for flexible document models. Released under MIT license, maintained by MoleculerJS, with TypeScript type definitions included. The package depends on moleculer-db and moleculer frameworks.
npm install moleculer-db-adapter-mongoNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Create a Moleculer broker, define a posts service with MongoDB adapter, create a document, then find all documents.
Use 'MongoDBAdapter' instead of 'MongoDBNativeAdapter'
If you need newer MongoDB features, you may need to use a different adapter or override the driver.
Install both: npm install moleculer moleculer-db
Use require() or configure your bundler to use CommonJS
Refer to documentation for any changes in constructor format
npm install moleculer-db moleculer-db-adapter-mongo
Use const MongoDBAdapter = require('moleculer-db-adapter-mongo');Provide valid credentials: mongodb://user:password@host/db