Node.js Weekly Update - 6 Jan, 2017

Read the most important Node.js news & updates from this week:

Node.js interview questions & answers for 2017, Supercharging Express Microservices with Hydra, Natural Language processing in JavaScript, and more..

The 6 must-read Node.js articles/projects of this Week:

○ Node.js Interview Questions and Answers

Read the most important Node.js Interview Questions and their answers if you'd like to nail the best job opportunities of 2017!

  • What is an error-first callback?
  • How can you avoid callback hells?
  • What are Promises?
  • What tools can be used to assure consistent style? Why is it important?
  • When should you npm and when yarn?
  • What's a stub? Name a use case!
  • What's a test pyramid? Give an example!
  • What's your favorite HTTP framework and why?
  • How can you secure your HTTP cookies against XSS attacks?
  • How can you make sure your dependencies are safe?

○ Tutorial: Building ExpressJS-based microservices using Hydra

This microservices tutorial describes how to use a new Node.js module called Hydra to supercharge your ExpressJS microservices efforts.

We're going to focus on a less tedious approach, one that uses a new NPM package called Hydra. Hydra is designed to greatly simplify microservice concerns. We built Hydra at Flywheel Sports and open sourced it at the 2016 EmpireNode conference in New York City.

○ Natural Language Processing in JavaScript with Natural

This course teaches you how to use Natural’s API for natural language processing in JavaScript.

We’ll look at how to process text, how to find important stats about a body of text and how to classify text with machine learning. We’ll also look at some of the extra tools Natural gives us, including the dictionary/thesaurus of WordNet, a phonetics comparer that lets us see if two words sound the same, and a spellcheck feature.

○ Improved Service Mapping in Trace

With Trace's Service Mapping feature you can take an immediate look at the interactions inside your application as well as the communication with databases and 3rd party APIs.

The New Left-to-Right Layout allows you to understand better how data flows in your infrastructure. Services initiating traffic are shown on the left side, while destinations on the right.

We also added a visual tweak that highlights paths. You can see what other services are taking part in the communication with a given service. This is ideal for understanding how a microservices application works.

○ Release, a new CLI to Manage GitHub Releases

When run, this command line interface automatically generates a new GitHub Release and populates it with the changes (commits) made since the last release.


Install the package from npm (you'll need the latest version of Node.js):

$ npm install -g release

Run this command inside your project's directory:

$ release


The following command will show you a list of all available options:

$ release help

○ Newb No More: Attending Node.js Interactive

Adriana Rios, artist turned programmer visits Node Interactive for the first time and summarizes her experiences about the event and the community.

In four days, I went from someone who felt like an outsider just wanting to learn more to a Node.js contributor. The Node.js community was warm and welcoming. Getting the chance to chat with fellow developers and hear about their projects gave me the opportunity to see the versatility of Node.js. The experience overall was priceless!

Important Updates to the Node.js Core

Node.js version 6.9.4 - A Special Update

This is a special release that contains 0 commits. While promoting additional platforms for v6.9.3 after the release, the tarballs on the release server were overwritten and now have different shasums.

In order to remove any ambiguity around the release we have opted to do a semver patch release with no changes.

Node.js version 6.9.3 'Boron' (LTS)

  • build: shared library support is now working for AIX builds
  • deps:
    • npm: upgrade npm to 3.10.10
    • V8: Destructuring of arrow function arguments via computed property no longer throws
  • inspector: /json/version returns object, not an object wrapped in an array
  • module: using --debug-brk and --eval together now works as expected
  • process: improve performance of nextTick up to 20%
  • repl:
    • the division operator will no longer be accidentally parsed as regex
    • improved support for generator functions
  • timers: Re canceling a cancelled timers will no longer throw

Node.js Version 7.4.0 (Current) released

  • buffer:
    • Improve performance of Buffer allocation by ~11%.
    • Improve performance of Buffer.from() by ~50%.
  • events: Improve performance of EventEmitter.once() by ~27%.
  • fs: Allow passing Uint8Array to fs methods where Buffers are supported.
  • http: Improve performance of http server by ~7%.
  • npm: Upgrade to v4.0.5

Minimal Docker Containers for Node.js Updated

As some of the most innovative companies like Oculus and Gilt Groupe jump into Docker containers, more and more base images appear on Docker Hub that can be used to containerize your applications.

With this said most of these Docker images has one or more of the following issues:

  • big in size
  • strange / non-existent versioning
  • mutable tags
  • unmaintained

We are happy to release our Alpine-based Node.js Docker images that try to solve those pain points. In this article, you will learn about why we went with Alpine, how we version our images and how you can start building applications using them today.

Previously in the Node.js Weekly Update

Last week we read fantastic articles about Migrating from Java to Node, Extending Slack with Node.js, IoT and Node, Top 10 of 2016, Unit-testing cheat sheet.