🚀 Progressive microservices framework for Node.js
Installations
npm install moleculer
Developer Guide
Typescript
Yes
Module System
CommonJS, ESM
Min. Node Version
>= 10.x.x
Node Version
12.22.12
NPM Version
6.14.16
Score
64.1
Supply Chain
88.6
Quality
74.8
Maintenance
50
Vulnerability
91.9
License
Releases
Contributors
Languages
JavaScript (99.43%)
TypeScript (0.44%)
Thrift (0.08%)
Shell (0.05%)
validate.email 🚀
Verify real, reachable, and deliverable emails with instant MX records, SMTP checks, and disposable email detection.
Developer
Download Statistics
Total Downloads
10,773,375
Last Day
9,647
Last Week
43,370
Last Month
183,326
Last Year
2,024,048
GitHub Statistics
MIT License
6,241 Stars
4,280 Commits
588 Forks
124 Watchers
7 Branches
121 Contributors
Updated on Mar 14, 2025
Bundle Size
616.24 kB
Minified
159.13 kB
Minified + Gzipped
Sponsor this package
Package Meta Information
Latest Version
0.14.35
Package Id
moleculer@0.14.35
Unpacked Size
1.16 MB
Size
255.05 kB
File Count
161
NPM Version
6.14.16
Node Version
12.22.12
Published on
Nov 06, 2024
Total Downloads
Cumulative downloads
Total Downloads
10,773,375
Last Day
27%
9,647
Compared to previous day
Last Week
7.2%
43,370
Compared to previous week
Last Month
20%
183,326
Compared to previous month
Last Year
-23.8%
2,024,048
Compared to previous year
Daily Downloads
Weekly Downloads
Monthly Downloads
Yearly Downloads
Dependencies
10
Peer Dependencies
22
Dev Dependencies
55
Moleculer

Moleculer is a fast, modern and powerful microservices framework for Node.js. It helps you to build efficient, reliable & scalable services. Moleculer provides many features for building and managing your microservices.
Website: https://moleculer.services
Documentation: https://moleculer.services/docs
Top sponsors
![]() |
What's included
- Promise-based solution (async/await compatible)
- request-reply concept
- support event driven architecture with balancing
- built-in service registry & dynamic service discovery
- load balanced requests & events (round-robin, random, cpu-usage, latency, sharding)
- many fault tolerance features (Circuit Breaker, Bulkhead, Retry, Timeout, Fallback)
- plugin/middleware system
- support versioned services
- support Streams
- service mixins
- built-in caching solution (Memory, MemoryLRU, Redis)
- pluggable loggers (Console, File, Pino, Bunyan, Winston, Debug, Datadog, Log4js)
- pluggable transporters (TCP, NATS, MQTT, Redis, NATS Streaming, Kafka, AMQP 0.9, AMQP 1.0)
- pluggable serializers (JSON, Avro, MsgPack, Protocol Buffer, Thrift, CBOR, Notepack)
- pluggable parameter validator
- multiple services on a node/server
- master-less architecture, all nodes are equal
- built-in parameter validation with fastest-validator
- built-in metrics feature with reporters (Console, CSV, Datadog, Event, Prometheus, StatsD)
- built-in tracing feature with exporters (Console, Datadog, Event, Jaeger, Zipkin, NewRelic)
- official API gateway, Database access and many other modules...
Installation
$ npm i moleculer
or
$ yarn add moleculer
Create your first microservice
This example shows you how to create a small service with an add
action which can add two numbers and how to call it.
1const { ServiceBroker } = require("moleculer"); 2 3// Create a broker 4const broker = new ServiceBroker(); 5 6// Create a service 7broker.createService({ 8 name: "math", 9 actions: { 10 add(ctx) { 11 return Number(ctx.params.a) + Number(ctx.params.b); 12 } 13 } 14}); 15 16// Start broker 17broker.start() 18 // Call service 19 .then(() => broker.call("math.add", { a: 5, b: 3 })) 20 .then(res => console.log("5 + 3 =", res)) 21 .catch(err => console.error(`Error occurred! ${err.message}`));
Create a Moleculer project
Use the Moleculer CLI tool to create a new Moleculer based microservices project.
-
Create a new project (named
moleculer-demo
)1$ npx moleculer-cli -c moleculer init project moleculer-demo
-
Open the project folder
1$ cd moleculer-demo
-
Start the project
1$ npm run dev
-
Open the http://localhost:3000/ link in your browser. It shows a welcome page that contains more information about your project & you can test the generated services.
:tada: Congratulations! Your first Moleculer-based microservices project is created. Read our documentation to learn more about Moleculer.
Official modules
We have many official modules for Moleculer. Check our list!
Supporting
Moleculer is an open source project. It is free to use for your personal or commercial projects. However, developing it takes up all our free time to make it better and better on a daily basis. If you like Moleculer framework, please support it.
Thank you very much!
For enterprise
Available as part of the Tidelift Subscription.
The maintainers of moleculer and thousands of other packages are working with Tidelift to deliver commercial support and maintenance for the open source dependencies you use to build your applications. Save time, reduce risk, and improve code health, while paying the maintainers of the exact dependencies you use. Learn more.
Documentation
You can find here the documentation.
Changelog
See CHANGELOG.md.
Security contact information
To report a security vulnerability, please use the Tidelift security contact. Tidelift will coordinate the fix and disclosure.
Contributions
We welcome you to join in the development of Moleculer. Please read our contribution guide.
Project activity
License
Moleculer is available under the MIT license.
Contact
Copyright (c) 2016-2023 MoleculerJS

No vulnerabilities found.
Reason
security policy file detected
Details
- Info: security policy file detected: SECURITY.md:1
- Info: Found linked content: SECURITY.md:1
- Info: Found disclosure, vulnerability, and/or timelines in security policy: SECURITY.md:1
- Info: Found text in security policy: SECURITY.md:1
Reason
no dangerous workflow patterns detected
Reason
11 commit(s) and 6 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 6/10 approved changesets -- score normalized to 6
Reason
dependency not pinned by hash detected -- score normalized to 3
Details
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/bench.yml:26: update your workflow using https://app.stepsecurity.io/secureworkflow/moleculerjs/moleculer/bench.yml/master?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/bench.yml:29: update your workflow using https://app.stepsecurity.io/secureworkflow/moleculerjs/moleculer/bench.yml/master?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/bench.yml:34: update your workflow using https://app.stepsecurity.io/secureworkflow/moleculerjs/moleculer/bench.yml/master?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:31: update your workflow using https://app.stepsecurity.io/secureworkflow/moleculerjs/moleculer/ci.yml/master?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:34: update your workflow using https://app.stepsecurity.io/secureworkflow/moleculerjs/moleculer/ci.yml/master?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:39: update your workflow using https://app.stepsecurity.io/secureworkflow/moleculerjs/moleculer/ci.yml/master?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/e2e.yml:37: update your workflow using https://app.stepsecurity.io/secureworkflow/moleculerjs/moleculer/e2e.yml/master?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/e2e.yml:40: update your workflow using https://app.stepsecurity.io/secureworkflow/moleculerjs/moleculer/e2e.yml/master?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/e2e.yml:45: update your workflow using https://app.stepsecurity.io/secureworkflow/moleculerjs/moleculer/e2e.yml/master?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/lint.yml:20: update your workflow using https://app.stepsecurity.io/secureworkflow/moleculerjs/moleculer/lint.yml/master?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/lint.yml:23: update your workflow using https://app.stepsecurity.io/secureworkflow/moleculerjs/moleculer/lint.yml/master?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/lint.yml:28: update your workflow using https://app.stepsecurity.io/secureworkflow/moleculerjs/moleculer/lint.yml/master?enable=pin
- Warn: third-party GitHubAction not pinned by hash: .github/workflows/notification.yml:18: update your workflow using https://app.stepsecurity.io/secureworkflow/moleculerjs/moleculer/notification.yml/master?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/pkg-publish.yml:26: update your workflow using https://app.stepsecurity.io/secureworkflow/moleculerjs/moleculer/pkg-publish.yml/master?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/pkg-publish.yml:28: update your workflow using https://app.stepsecurity.io/secureworkflow/moleculerjs/moleculer/pkg-publish.yml/master?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/pkg-publish.yml:33: update your workflow using https://app.stepsecurity.io/secureworkflow/moleculerjs/moleculer/pkg-publish.yml/master?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/pkg-publish.yml:48: update your workflow using https://app.stepsecurity.io/secureworkflow/moleculerjs/moleculer/pkg-publish.yml/master?enable=pin
- Warn: containerImage not pinned by hash: examples/docker/client/Dockerfile:1: pin your Docker image by updating node:8-alpine to node:8-alpine@sha256:38f7bf07ffd72ac612ec8c829cb20ad416518dbb679768d7733c93175453f4d4
- Warn: containerImage not pinned by hash: examples/docker/worker/Dockerfile:1: pin your Docker image by updating node:8-alpine to node:8-alpine@sha256:38f7bf07ffd72ac612ec8c829cb20ad416518dbb679768d7733c93175453f4d4
- Warn: npmCommand not pinned by hash: examples/docker/client/Dockerfile:10
- Warn: npmCommand not pinned by hash: examples/docker/worker/Dockerfile:10
- Info: 0 out of 16 GitHub-owned GitHubAction dependencies pinned
- Info: 0 out of 1 third-party GitHubAction dependencies pinned
- Info: 0 out of 2 containerImage dependencies pinned
- Info: 5 out of 7 npmCommand dependencies pinned
Reason
badge detected: InProgress
Reason
detected GitHub workflow tokens with excessive permissions
Details
- Warn: no topLevel permission defined: .github/workflows/bench.yml:1
- Warn: no topLevel permission defined: .github/workflows/ci.yml:1
- Warn: no topLevel permission defined: .github/workflows/e2e.yml:1
- Warn: no topLevel permission defined: .github/workflows/lint.yml:1
- Warn: no topLevel permission defined: .github/workflows/notification.yml:1
- Warn: no topLevel permission defined: .github/workflows/pkg-publish.yml:1
- Info: no jobLevel write permissions found
Reason
branch protection not enabled on development/release branches
Details
- Warn: branch protection not enabled for branch 'master'
Reason
project is not fuzzed
Details
- Warn: no fuzzer integrations found
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
- Warn: 0 commits out of 26 are checked with a SAST tool
Reason
15 existing vulnerabilities detected
Details
- Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275
- Warn: Project is vulnerable to: GHSA-w573-4hg7-7wgq
- Warn: Project is vulnerable to: GHSA-wm7h-9275-46v2
- Warn: Project is vulnerable to: GHSA-pfrx-2q88-qq97
- Warn: Project is vulnerable to: GHSA-p6mc-m468-83gw
- Warn: Project is vulnerable to: GHSA-952p-6rrq-rcjv
- Warn: Project is vulnerable to: GHSA-mwcw-c2x4-8c55
- Warn: Project is vulnerable to: GHSA-9wv6-86v2-598j
- Warn: Project is vulnerable to: GHSA-rhx6-c78j-4q9w
- Warn: Project is vulnerable to: GHSA-h755-8qp9-cq85
- Warn: Project is vulnerable to: GHSA-p8p7-x288-28g6
- Warn: Project is vulnerable to: GHSA-c2qf-rxjj-qqgw
- Warn: Project is vulnerable to: GHSA-72xf-g2v4-qvf3
- Warn: Project is vulnerable to: GHSA-j8xg-fqg3-53r7
- Warn: Project is vulnerable to: GHSA-3h5v-q93c-6h6q
Score
4.9
/10
Last Scanned on 2025-03-03
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 More