Installations
npm install moleculer-db-adapter-mongo
Developer Guide
Typescript
No
Module System
CommonJS
Min. Node Version
>= 8.x.x
Node Version
12.22.12
NPM Version
lerna/4.0.0/node@v12.22.12+x64 (win32)
Score
65.8
Supply Chain
91.4
Quality
75.3
Maintenance
100
Vulnerability
98.2
License
Releases
moleculer-db@0.8.28
Updated on Feb 17, 2025
moleculer-db-adapter-mongoose@0.10.0
Updated on Jan 29, 2025
moleculer-db@0.8.26
Updated on Aug 24, 2024
moleculer-db@0.8.25
Updated on Nov 12, 2023
moleculer-db@0.8.24
Updated on Jul 15, 2023
moleculer-db-adapter-mongoose@0.9.3
Updated on Jul 15, 2023
Contributors
Languages
JavaScript (100%)
validate.email 🚀
Verify real, reachable, and deliverable emails with instant MX records, SMTP checks, and disposable email detection.
Developer
Download Statistics
Total Downloads
957,120
Last Day
402
Last Week
2,024
Last Month
9,918
Last Year
126,010
GitHub Statistics
MIT License
154 Stars
595 Commits
121 Forks
9 Watchers
30 Branches
48 Contributors
Updated on Feb 17, 2025
Bundle Size
519.94 kB
Minified
140.68 kB
Minified + Gzipped
Package Meta Information
Latest Version
0.4.21
Package Id
moleculer-db-adapter-mongo@0.4.21
Unpacked Size
44.99 kB
Size
10.10 kB
File Count
12
NPM Version
lerna/4.0.0/node@v12.22.12+x64 (win32)
Node Version
12.22.12
Published on
Aug 24, 2024
Total Downloads
Cumulative downloads
Total Downloads
957,120
Last Day
29.7%
402
Compared to previous day
Last Week
-10.5%
2,024
Compared to previous week
Last Month
-12%
9,918
Compared to previous month
Last Year
-23.6%
126,010
Compared to previous year
Daily Downloads
Weekly Downloads
Monthly Downloads
Yearly Downloads
moleculer-db-adapter-mongo 
MongoDB native adapter for Moleculer DB service.
Features
- schemaless adapter
- MongoDB driver v3.0
Install
1$ npm install moleculer-db moleculer-db-adapter-mongo --save
Usage
1"use strict"; 2 3const { ServiceBroker } = require("moleculer"); 4const DbService = require("moleculer-db"); 5const MongoDBAdapter = require("moleculer-db-adapter-mongo"); 6 7const broker = new ServiceBroker(); 8 9// Create a Mongoose service for `post` entities 10broker.createService({ 11 name: "posts", 12 mixins: [DbService], 13 adapter: new MongoDBAdapter("mongodb://127.0.0.1/moleculer-demo"), 14 collection: "posts" 15}); 16 17 18broker.start() 19// Create a new post 20.then(() => broker.call("posts.create", { 21 title: "My first post", 22 content: "Lorem ipsum...", 23 votes: 0 24})) 25 26// Get all posts 27.then(() => broker.call("posts.find").then(console.log));
Options
Example with connection URI
1new MongoDBAdapter("mongodb://127.0.0.1/moleculer-db")
Example with connection URI & options
1new MongoDBAdapter("mongodb://db-server-hostname/my-db", {
2 keepAlive: 1
3})
Test
$ npm test
In development with watching
$ npm run ci
License
The project is available under the MIT license.
Contact
Copyright (c) 2016-2024 MoleculerJS

No vulnerabilities found.
Reason
no dangerous workflow patterns detected
Reason
15 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 10
Reason
no binaries found in the repo
Reason
license file detected
Details
- Info: project has a license file: LICENSE:0
- Info: FSF or OSI recognized license: MIT License: LICENSE:0
Reason
Found 8/10 approved changesets -- score normalized to 8
Reason
detected GitHub workflow tokens with excessive permissions
Details
- Warn: no topLevel permission defined: .github/workflows/ci.yml:1
- Info: no jobLevel write permissions found
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:17: update your workflow using https://app.stepsecurity.io/secureworkflow/moleculerjs/moleculer-db/ci.yml/master?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:20: update your workflow using https://app.stepsecurity.io/secureworkflow/moleculerjs/moleculer-db/ci.yml/master?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:25: update your workflow using https://app.stepsecurity.io/secureworkflow/moleculerjs/moleculer-db/ci.yml/master?enable=pin
- Warn: third-party GitHubAction not pinned by hash: .github/workflows/ci.yml:49: update your workflow using https://app.stepsecurity.io/secureworkflow/moleculerjs/moleculer-db/ci.yml/master?enable=pin
- Info: 0 out of 3 GitHub-owned GitHubAction dependencies pinned
- Info: 0 out of 1 third-party GitHubAction dependencies pinned
Reason
security policy file not detected
Details
- Warn: no security policy file detected
- Warn: no security file to analyze
- Warn: no security file to analyze
- Warn: no security file to analyze
Reason
project is not fuzzed
Details
- Warn: no fuzzer integrations found
Reason
branch protection not enabled on development/release branches
Details
- Warn: branch protection not enabled for branch 'master'
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
- Warn: 0 commits out of 28 are checked with a SAST tool
Reason
41 existing vulnerabilities detected
Details
- Warn: Project is vulnerable to: GHSA-968p-4wvh-cqc8
- Warn: Project is vulnerable to: GHSA-h5c3-5r3r-rr8q
- Warn: Project is vulnerable to: GHSA-rmvr-2pp2-xj38
- Warn: Project is vulnerable to: GHSA-xx4v-prfh-6cgc
- Warn: Project is vulnerable to: GHSA-grv7-fg5c-xmjg
- Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275
- Warn: Project is vulnerable to: GHSA-4gmj-3p3h-gm8h
- Warn: Project is vulnerable to: GHSA-8jmw-wjr8-2x66
- Warn: Project is vulnerable to: GHSA-pfrx-2q88-qq97
- Warn: Project is vulnerable to: GHSA-rc47-6667-2j5j
- Warn: Project is vulnerable to: GHSA-78xj-cgh5-2h22
- Warn: Project is vulnerable to: GHSA-2p57-rm9w-gvfp
- Warn: Project is vulnerable to: GHSA-35jh-r3h4-6jhm
- Warn: Project is vulnerable to: GHSA-952p-6rrq-rcjv
- Warn: Project is vulnerable to: GHSA-3j8f-xvm3-ffx4
- Warn: Project is vulnerable to: GHSA-4p35-cfcx-8653
- Warn: Project is vulnerable to: GHSA-7f3x-x4pr-wqhj
- Warn: Project is vulnerable to: GHSA-jpp7-7chh-cf67
- Warn: Project is vulnerable to: GHSA-q6wq-5p59-983w
- Warn: Project is vulnerable to: GHSA-j9fq-vwqv-2fm2
- Warn: Project is vulnerable to: GHSA-pqw5-jmp5-px4v
- Warn: Project is vulnerable to: GHSA-p8p7-x288-28g6
- Warn: Project is vulnerable to: GHSA-c2qf-rxjj-qqgw
- Warn: Project is vulnerable to: GHSA-f5x3-32g6-xq36
- Warn: Project is vulnerable to: GHSA-72xf-g2v4-qvf3
- Warn: Project is vulnerable to: GHSA-3h5v-q93c-6h6q
- Warn: Project is vulnerable to: GHSA-wf5p-g6vw-rhxx
- Warn: Project is vulnerable to: GHSA-jr5f-v2jv-69x6
- Warn: Project is vulnerable to: GHSA-mwcw-c2x4-8c55
- Warn: Project is vulnerable to: GHSA-hrpp-h998-j3pp
- Warn: Project is vulnerable to: GHSA-mxhp-79qh-mcx6
- Warn: Project is vulnerable to: GHSA-93q8-gq69-wqmw
- Warn: Project is vulnerable to: GHSA-7p7h-4mm5-852v
- Warn: Project is vulnerable to: GHSA-g3ch-rx76-35fx
- Warn: Project is vulnerable to: GHSA-mqr2-w7wj-jjgr
- Warn: Project is vulnerable to: GHSA-49j4-86m8-q2jw
- Warn: Project is vulnerable to: GHSA-fpw7-j2hg-69v5
- Warn: Project is vulnerable to: GHSA-4rch-2fh8-94vw
- Warn: Project is vulnerable to: GHSA-pmh2-wpjm-fj45
- Warn: Project is vulnerable to: GHSA-5fg8-2547-mr8q
- Warn: Project is vulnerable to: GHSA-crh6-fp67-6883
Score
4.2
/10
Last Scanned on 2025-03-10
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn MoreOther packages similar to moleculer-db-adapter-mongo
moleculer-db-adapter-typeorm-mongo
typescript mongo adapter using typeorm for moleculer-db-typeorm
@orgware/moleculer-db-adapter-mongo
MongoDB native adapter for Moleculer DB service.
moleculer-db-adapter-mongo-new
@sportwarp/sportwarp-db-adapter-mongo
MongoDB native adapter for Moleculer DB service.