The Node.js Update #Week 17 of 2019. 26 April

Below you can find a collection of the most important Node.js updates, tutorials & announcements from this week - curated by RisingStack's Node.js Developers.

Introducing Node.js 12

Written by Bethany Griggs and Michael Dawson, with additional contributions from the Node.js Release Team and TSC.

We are excited to announce Node.js 12 today. Highlighted updates and features include faster startup and better default heap limits, updates to V8, TLS, llhttp, new features including diagnostic report, bundled heap dump capability and updates to Worker Threads, N-API and ES6 module support and more.

The Node.js 12 release replaces version 11 in our current release line. The Node.js release line will become a Node.js Long Term Support (LTS) release in Oct 2019 (more details on LTS strategy here).

Announcing a new --experimental-modules

Written by the Node.js Module Team.

Node.js’s initial ES modules support remained in an experimental state in order to allow the community time to provide feedback on that design. The Modules Team was formed to act on this feedback and ship first-class support for ES modules in Node.js. This has led to a new implementation for supporting ES modules, that we are pleased to announce will ship as part of Node.js 12.

It will replace the old --experimental-modules implementation, behind the same flag. We hope that this new implementation addresses many of the community’s concerns, and can ship as part of Node.js proper, without a flag, before Node.js 12 reaches LTS status in October 2019.

You should never ever run directly against Node.js in production. Maybe

Written by Burke Holland.

Just a few weeks ago I was talking to a friend who mentioned off-hand, “you would never run an application directly against Node in production”. I nodded vigorously to signal that I also would never ever run against Node in production because…hahaha….everyone knows that. But I didn’t know that! Should I have known that?!?? AM I STILL ALLOWED TO PROGRAM?

whatiknow

Never run directly against Node in production

Maybe. But maybe not. Let’s talk about the reasoning behind this statement...

Running the Node.js Bookshelf on Kubernetes Engine

This tutorial shows how to run the Node.js Bookshelf app on Google Kubernetes Engine (GKE). Follow this tutorial to containerize and deploy an existing Node.js web app to GKE.

Objectives:

  • Create a GKE cluster.
  • Containerize a Node.js app.
  • Create a replicated frontend for the Bookshelf app.
  • Create a replicated backend for the Bookshelf app.
  • Create a load-balanced service to route HTTP traffic to the Bookshelf frontend.

The new ECMAScript module support in Node.js 12

Node.js 12 brings improved support for ECMAScript modules. It implements phase 2 of the plan that was released late last year. For now, this support is available behind the usual flag --experimental-modules.

Building A Node.js Express API To Convert Markdown To HTML

Markdown is a lightweight text markup language that allows the marked text to be converted to various formats.

The original goal of creating Markdown was of enabling people “to write using an easy-to-read and easy-to-write plain text format” and to optionally convert it to structurally valid XHTML (or HTML). Currently, with WordPress supporting Markdown, the format has become even more widely used.

The purpose of writing the article is to show you how to use Node.js and the Express framework to create an API endpoint. The context in which we will be learning this is by building an application that converts Markdown syntax to HTML. We will also be adding an authentication mechanism to the API so as to prevent misuse of our application.

Using Clean Architecture for Microservice APIs in Node.js with MongoDB and Express

In this video we talk about Bob Martin's Clean Architecture model and I will show you how we can apply it to a Microservice built in node.js with MongoDB and Express JS.