Image for post
Image for post
Photo by Kelli McClintock on Unsplash

In this article, I will show you how you can bundle your Moleculer-based microservices project into an executable with pkg.

Why do we want to bundle a microservices project?

  • Making a commercial application which is executed on-premise without source code
  • Deploy it as a single file; no need to install Node.js, npm, and download millions of files via npm install
  • Minimizing the Docker image size
  • …just for fun :)

Create a sample project

To generate a Moleculer microservice project, I’m using the official “project” template with Moleculer CLI.

$ moleculer init project moleculer-demo

Image for post
Image for post
Photo by Maxime Le Conte des Floris on Unsplash

I would like to announce that the v0.12 version of Moleculer has been released. It is the biggest release in the history of the project with more than 200 commits and 17k additions. It has brought a plenty of excellent new features to the framework. In this post, I wish to share some useful information about the new version.

First of all, I would like to tell that I have created a Patreon profile. If you enjoy using Moleculer, this is your opportunity to support my work. You can read more here about supporting. Become a patron!

If you want to upgrade your project to v0.12, please read the full detailed Changelog because it contains breaking changes. …

Image for post
Image for post
Photo by Oli Dale on Unsplash

A few weeks ago I conducted a survey among the Moleculer users to gain information about how they use Moleculer in their projects. I also asked them to tell why they love it and what they miss.

In brief, most users love Moleculer because it is fast, simple, flexible and it has excellent and up-to-date documentation.

Here is the result of the survey:

How did you hear about Moleculer?

Image for post
Image for post
By Detlef Reichardt. Licensed under CC BY-NC-ND 2.0

Do you like NodeJS? Are you interested in microservices but don’t know how to create them? Stay with me! I will show you how easy it is to create a microservice with the Moleculer microservices framework in NodeJS.

What are we going to do?

We are going to create a microservice, which can store data in a memory DB and publish access via HTTP port (API Gateway) with REST API.

What you need is…

  1. NodeJS (at least v8.x)
  2. VSCode or any other text editor.
  3. PostMan or any other REST API tester.

Are you ready?

Step 1: Install Moleculer CLI tool

We are going to create a Moleculer project from a template. For this, we use the official Moleculer CLI tool. …

Image for post
Image for post

I would like to announce that as the outcome of a half year’s hard work I created a brand-new microservices framework for Node.js.

What is Moleculer?

Moleculer is an open-source fast & flexible microservices framework, licensed under MIT. It contains most of all important microservices features (service registry, auto-discovery, load balancing, circuit-breaker, bulkhead, fallback response…etc).

Key features

  • Promise-based solution
  • request-reply concept
  • supports the event-driven architecture with balancing
  • supports middlewares
  • built-in caching solution (Memory, Redis)
  • pluggable transporters (TCP, NATS, MQTT, Redis, AMQP, NATS Streaming, Kafka)
  • pluggable serializers (JSON, Avro, MsgPack, Protocol Buffer, Thrift)
  • load-balanced requests (round-robin, random)
  • auto-discovery services & built-in service registry
  • master-less architecture, all nodes are…

Image for post
Image for post

One month ago, I started to create a big and modern boilerplate project for VueJS based webapps with an Express NodeJS server.

Firstly I created the user pages for login, signup and password reset functions. After I finished the server side codes of these functions, I want to cover the full signup and login workflows with tests. But I want to test the email sending functions too. For example the user get a verification e-mail message after signup or get an e-mail message with a password reset link if submit the forgot password form. …

Image for post
Image for post

Two weeks ago, I wrote an article about how to get the new official 7 inch touch display from the Raspberry Pi foundation working with X11 and Chromium.

Back then I used HypriotOS — an SD card image optimized for Docker-awesomeness — from the Docker Pirates to start from.

Some days ago the Hypriot guys released a new image from their Operating System. It now not only contains the Docker-Engine, but also Docker Compose, Swarm and Machine. That’s why they call it now “the ultimate Docker playground for the Raspberry Pi”. The hardware support got much better, too. …

Image for post
Image for post

I have a hobby/home project. I’m developing an NodeJS app and I would like to get it running on a Raspberry Pi 2 with 7" touch display. The application UI is running in a browser (Chromium) in kiosk mode. So my main problem is now that the official Raspbian image is a Debian Wheezy OS and only support Chromium v22. This version is from 2012 and is very old and slow. At the time of writing the latest Chromium is v45 and is available for instance in the Ubuntu MATE OS.

Some days ago I found an excellent blog from the Hypriot’s guys. They offer a SD card image for Raspberry Pi’s that is based on the Debian distribution and optimised for running Docker. Lately they switched from Wheezy to Jessie (latest version kernel is v4.1.6). Their image is very small (1.4GB) — which is good — but there is no pre-installed X which I will need to run my application. So after downloading and flashing it, I started to install a lightweight X-Server and the latest Chromium browser. …



A full-stack javascript developer, founder of Moleculer

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store