Skip to content
Moleculer for the browser.
JavaScript HTML
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.
example Added missing shims for process, os and getCpuUsage based on fps Jul 16, 2019
src Added browser logger. Jul 23, 2019
tests Increase timeout in jest. Jul 23, 2019
.editorconfig Added initial moleculer browser setup. Jul 10, 2019
.eslintrc.json Added initial browser testing. Jul 23, 2019
.travis.yml 0.0.3 Jul 24, 2019 Added initial moleculer browser setup. Jul 10, 2019
LICENSE Added Glitch and Codesandbox playground. Jul 24, 2019
jest-puppeteer.config.js Increased server.launchTimeout. Jul 23, 2019
package.json 0.0.3 Jul 24, 2019
rollup.config.js Added initial browser testing. Jul 23, 2019


Build Status JavaScript Style Guide standard-readme compliant stability-experimental

Moleculer for the browser.

moleculer-browser is a wrapper on top of Moleculer.

Most of the 90% of the Moleculer's codebase is platform agnostic.

Using rollup we replaced the specific code for Node.js with shims to simulate the original behaviour.


$ npm install @geut/moleculer-browser


const { ServiceBroker } = require('@geut/moleculer-browser')

const broker = new ServiceBroker({
  transporter: { type: 'fake' },
  serializer: 'Json',
  logger: console

  name: 'math',
  actions: {
    add (ctx) {
      return Number(ctx.params.a) + Number(ctx.params.b)

// Call service
  .then(() =>'math.add', { a: 5, b: 3 }))
  .then(res => console.log('5 + 3 =', res))
  .catch(err => console.error(`Error occured! ${err.message}`))



view source remix this


Edit moleculer-browser


When we talk about services we think at some point in a process running in some environment. Well, the browser is a process too.

What if the browser could provide a service itself through a network on top of WebSockets or WebRTC?

That's what we want to show here.


🐛 If you found an issue we encourage you to report it on github. Please specify your OS and the actions to reproduce it.


👥 Ideas and contributions to the project are welcome. You must follow this guideline.


MIT © A GEUT project

You can’t perform that action at this time.