This version has reached end-of-life. It is no longer maintained. For the latest stable version, click here.


Project examples

Realworld backend server

This is a example backend server with Moleculer microservices framework.

Key features

  • 7 microservices
  • NeDB or MongoDB database without Mongoose
  • User login & signup
  • User authentication with JWT
  • Memory caching
  • Docker files



This is a simple blog example.

Key features


Short examples

The main Moleculer repository contains some examples.


This is a simple demo with a Math service which can add, sub, mult and divide two numbers.

$ npm run demo simple

Source code is available on Github

Server & client nodes

In this example, you can start any servers & clients. The servers serve the math.add action and clients call it in a loop. You can start multiple instances from both.
They use TCP transporter, but you can change it with TRANSPORTER env variable.

Start a server

$ node examples/client-server/server

Start a client

$ node examples/client-server/client

Source code is available on Github


This example demonstrates how the middleware system works.

$ npm run demo middlewares

Source code is available on Github


This example shows how you can start a broker and load services with Moleculer Runner.

$ node ./bin/moleculer-runner.js -c examples/runner/moleculer.config.js -r examples/user.service.js

It starts a broker with options from moleculer.config.js, loads the user service from user.service.js file and switch to REPL mode.

Source code is available on Github

Load tester

With this example, you can start a load test. The server & client prints how many requests executed in a second.

Start server

$ node examples/loadtest/server

Start & fork clients (number of CPU cores)

$ node examples/loadtest/clients

Source code is available on Github