Node.js 12 now available for Netlify Functions

Node.js 12 now available for Netlify Functions

Last month AWS announced the release of Node.js 12 for Lambda functions. This means faster functions & new Node.js features. πŸŽ‰ All new sites will be using Node.js 12 as the default function runtime. All existing sites can update to Node.js 12 for Netlify Functions via the instructions below.

Last month AWS announced the release of Node.js 12 for Lambda functions.

This means faster functions & new Node.js features. πŸŽ‰

Welcome to the #serveless dining experience for reinvent 2019. For your first course, we have three crisp new #awslambda language versions. My personal favorite is Java 11 , but the Node 12 is super fresh ! https://t.co/xWJ3A9eV47 #HowManyCourses pic.twitter.com/4AkIezMtaL

β€” Ajay Nair (@ajaynairthinks) November 18, 2019

Starting today, all new sites will be using Node.js 12 as the default function runtime. All existing sites can update to Node.js 12 for Netlify Functions via the instructions below.

What’s new?

Node.js 12 brings performance improvements and many new language features. In tests like the one charted below (source), Node.js 12 is almost catching up to Go! 🀯 Zoom zoom.

Bar graph of test results in requests per second, increasing from less than 20,000 with Node v4.9.1 to over 25,000 with Node v12.2.0, compared with just under 30,000 with Go v1.10.4

For more information on Node.js 12, check out this post and the official Node.js 12 changelog

How to upgrade existing site functions

To take advantage of the newer Node.js runtime with functions on sites created before December 4, 2019, you will need to set the AWS_LAMBDA_JS_RUNTIME environment variable to nodejs12.x in the Netlify site settings under Build & deploy > Environment > Environment variables.

After setting the environment variable, update your function code to trigger a new deployment.

Questions?

If you have questions, feel free to drop us a line in the Netlify Community forums.

Angular 9 Tutorial: Learn to Build a CRUD Angular App Quickly

What's new in Bootstrap 5 and when Bootstrap 5 release date?

Brave, Chrome, Firefox, Opera or Edge: Which is Better and Faster?

How to Build Progressive Web Apps (PWA) using Angular 9

What is new features in Javascript ES2020 ECMAScript 2020

Node.js Tutorial for Beginners [06] - When and when not to use Node.js

When and when not to use Node.js - Understand the core problems that Node.js was meant to solve and why it is a good choice for certain applications and not for some others! Learn the strengths and weaknesses of the Node.js platform.

Node.js for Beginners - Learn Node.js from Scratch (Step by Step)

Node.js for Beginners - Learn Node.js from Scratch (Step by Step) - Learn the basics of Node.js. This Node.js tutorial will guide you step by step so that you will learn basics and theory of every part. Learn to use Node.js like a professional. You’ll learn: Basic Of Node, Modules, NPM In Node, Event, Email, Uploading File, Advance Of Node.

How to get started Internationalization in JavaScript with NodeJS

Tutorial showing how to use the Intl JS API in NodeJS (i18n). We'll install a module to unlock the Intl API languages for Node and test out RelativeTimeFormat to translate and localise relative times in JavaScript.