Node.js Weekly Update - 7 April, 2017

Below you can find RisingStack's collection of the most important Node.js news, projects & updates from this week:

1. Node.js War Stories: Debugging Issues in Production

In this article, you can read stories from Netflix, RisingStack & nearForm about Node.js issues in production - so you can learn from these mistakes and avoid repeating them.

2. Using Docker Swarm for Deploying Node.js Microservices

The architecture outlined in this article will be quite scalable. The approach we'll look at here can be further scaled in complexity to accommodate your specific needs.

In this post, we'll create a Docker Swarm cluster almost entirely from the command line! In the process, we'll deploy multiple services and introduce application and message-based load balancing.

3. Unhandled Promise Rejections in Node.js

Node.js 6.6.0 added a sporadically useful bug/feature: logging unhandled promise rejections to the console by default. In other words, the below script will print an error to the console:

Promise.reject(new Error('woops'));

/* Output:
$ node test.js
(node:7741) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Error: woops
(node:7741) DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code. */

I've vocally expressed my distaste for this behavior in the past, it's actually one of the many reasons why I don't use bluebird. But now that this behavior is in core node, it appears we're all stuck with it, so we better learn to take advantage of it.

4. How to Start a Node.js User Group

I started a Node.js User Group here in Jacksonville back in 2013, and I wanted to share my experiences about starting a Node.js User Group for anyone who has ever wanted to get one started in their community!

5. Node.js Interactive 2017 CFP Guide

To help encourage the open collaboration, discussions, and debates necessary to help Node.js Interactive be successful, we invite developers, industry thought leaders, and technical experts to submit a proposal to speak.

  • CFP Open: Wednesday, March 1 2017
  • CFP Close: Monday, April 10, 2017, 11:59 PST

6. Legacy Debugger Removed from Node 8.0.0

The legacy debugger in Node.js will be removed in 8.0.0 without a normal deprecation cycle.

The reason for the quick removal is that the underlying implementation in V8 is going away in V8 5.8, which is due to go stable on April 25.

The legacy debugger has been replaced by the Chrome Inspector protocol using --inspect.

The the node-inspect tool now ships as part of the Node.js distribution.

7. n-api: add support for abi stable module API

The goal of this API is to provide a stable Node API for native module developers. N-API aims to provide ABI compatibility guarantees across different Node versions and also across different Node VMs - allowing N-API enabled native modules to just work across different versions and flavors of Node.js without recompilation.

A more detailed introduction is provided at:

Latest Node.js Releases

○ Node v6.10.2 (LTS)

Notable changes:

  • crypto:
    • fix memory leak if certificate is revoked
  • deps:
    • upgrade zlib to 1.2.11
    • backport V8 fixes for spread syntax regression causing segfaults
  • repl:
    • Revert commit that broke REPL display on Windows

○ Node v4.8.2 (Maintenance)

Notable changes:

  • crypto:
    • fix memory leak if certificate is revoked
  • deps:
    • upgrade zlib to 1.2.11

Previously in the Node.js Weekly Update

In the previous Node.js Weekly Update we read about Deploying Microservices to Docker, Monitoring Node Applications, Why Async/Await Rules & v7.8.0 was also released.

We help you to stay up-to-date with Node.js on a daily basis too. Check out our Node.js news page and its Twitter feed!