Node.js is a cross-platform, open-source JavaScript runtime environment that can run on Windows, Linux, Unix, macOS, and more. Node.js runs on the V8 JavaScript engine, and executes JavaScript code outside a web browser. According to the Stack Overflow Developer Survey, Node.js is one of the most commonly used web technologies.

Node.js allows developers to use JavaScript for writing command line tools and server-side scripting. Running Javascript on the server is commonly used to generate dynamic web page content before the page is sent to the user's web browser. Consequently, Node.js represents a "JavaScript everywhere" paradigm, unifying web-application development around a single programming language, as opposed to using different languages for the server- versus client-side programming.

Node.js has an event-driven architecture capable of asynchronous I/O. These design choices aim to optimize throughput and scalability in web applications with many input/output operations, as well as for real-time Web applications (e.g., real-time communication programs and browser games).

The Node.js distributed development project was previously governed by the Node.js Foundation, and has now merged with the JS Foundation to form the OpenJS Foundation. OpenJS Foundation is facilitated by the Linux Foundation's Collaborative Projects program.

History

Node.js was initially written by Ryan Dahl in 2009, about 13 years after the introduction of the first server-side JavaScript environment, Netscape's LiveWire Pro Web. The initial release supported only Linux and Mac OS X. Its development and maintenance was led by Dahl and later sponsored by Joyent.

Dahl criticized the limited capability of Apache HTTP Server to handle many (10,000+) concurrent connections, as well as the dominant programming paradigm of sequential programming, in which applications could block entire processes or cause the creation of multiple execution stacks for simultaneous connections.

Dahl demonstrated the project at the inaugural European JSConf on November 8, 2009.Sams Teach Yourself Node.js in 24 Hours, Sams Publishing, 05-Sep-2012 Node.js combined Google's V8 JavaScript engine, an event loop, and a low-level I/O API.Professional Node.js: Building JavaScript Based Scalable Software, John Wiley & Sons, 01-Oct-2012

In January 2010, a package manager was introduced for the Node.js environment called npm. The package manager allows programmers to publish and share Node.js packages, along with the accompanying source code, and is designed to simplify the installation, update and uninstallation of packages.

In June 2011, Microsoft and Joyent implemented a native Windows version of Node.js. The first Node.js build supporting Windows was released in July 2011.

In January 2012, Dahl yielded management of the project to npm creator Isaac Schlueter. In January 2014, Schlueter announced that Timothy J. Fontaine would lead the project.

In December 2014, Fedor Indutny created io.js, a fork of Node.js created because of dissatisfaction with Joyent's governance as an open-governance alternative with a separate technical committee. The goal was to enable a structure that would be more receptive to community input, including the updating of io.js with the latest Google V8 JavaScript engine releases, diverging from Node.js's approach at that time.Q&A: Why io.js decided to fork Node.js, InfoWorld Tech Watch

The Node.js Foundation, formed to reconcile Node.js and io.js under a unified banner, was announced in February 2015. The merger was realized in September 2015 with Node.js v0.12 and io.js v3.3 combining into Node v4.0. This merge brought V8 ES6 features into Node.js and started a long-term support release cycle. By 2016, the io.js website recommended returning to Node.js and announced no further io.js releases, effectively ending the fork and solidifying the merger's success.Io.js, JavaScript I/O, "io.js has merged with the Node.js project again. There won't be any further io.js releases. All of the features in io.js are available in Node.js v4 and above."

In 2019, the JS Foundation and Node.js Foundation merged to form the OpenJS Foundation.

Branding The Node.js logo features a green hexagon with overlapping bands to represent the cross-platform nature of the runtime. The Rocket Turtle was chosen as the official Node.js mascot in February 2024 following a design contest.

Overview Node.js allows the creation of web servers and networking tools using JavaScript and a collection of "modules" that handle various core functionalities.Smashing Node.js: JavaScript Everywhere, John Wiley & Sons, 14-Aug-2012 Modules are provided for file system I/O, networking (DNS, HTTP, TCP, TLS/SSL or UDP), binary data (buffers), cryptography functions, data streams and other core functions.Modules, Nodejs Website Node.js's modules use an API designed to reduce the complexity of writing server applications.Node.js Essentials, Packt Publishing, 10-Nov-2015

Since version 22.6.0, Node.js natively supports both JavaScript and TypeScript, allowing TypeScript files to be executed without a separate compilation step. The TypeScript support was contributed by Node.js TSC member Marco Ippolito. In addition, many compile-to-JS languages are available, allowing Node.js applications to also be written in CoffeeScript, Dart, ClojureScript, and others.

Node.js is primarily used to build network programs such as web servers.Node.js for PHP Developers, O'Reilly Media, Inc., 2013 The most significant difference between Node.js and PHP is that most functions in PHP block until completion (commands execute only after previous commands finish), while Node.js functions are non-blocking (commands execute concurrently and use callbacks to signal completion or failure).

Node.js is officially supported by Linux, and Microsoft Windows 8.1 and Server 2012 (and later), with Tier 2 support for SmartOS and IBM AIX and experimental support for FreeBSD. OpenBSD also works, and LTS versions are available for IBM i (AS/400). The source code may also be built on similar operating systems that are not officially supported, such as NonStop OS and Unix servers.

Platform architecture Node.js enables development of fast web servers in JavaScript using event-driven programming. Developers can create scalable servers without using threading by using a simplified model that uses callbacks to signal the completion of a task. Node.js connects the ease of a scripting language (JavaScript) with the power of Unix network programming.

Node.js was built on top of Google's V8 JavaScript engine, which Google had open-sourced under a BSD 3-Clause license in September 2008 alongside the initial release of Google Chrome. Dahl selected V8 for its high performance and its just-in-time compilation of JavaScript to native machine code, and paired it with a libuv-based event loop and comprehensive support for fundamental protocols such as HTTP, DNS, and TCP. JavaScript's existing popularity made Node.js accessible to the web-development community.

Industry support There are thousands of open-source libraries for Node.js, most of which are hosted on the npm website. Multiple developer conferences and events are held that support the Node.js community, including NodeConf, Node Interactive, and Node Summit, as well as a number of regional events.

The open-source community has developed web frameworks to accelerate the development of applications. Such frameworks include Express.js, Socket.IO, Sails.js, Next.js and Meteor.Express.js Guide: The Comprehensive Book on Express.js, Azat Mardan, 28-May-2014 Various packages have also been created for interfacing with other languages or runtime environments such as Microsoft .NET.Edge.js bridges the gap between Node.js and .NET, TechRepublic, Tony Patton, 1 July 2014

Modern desktop IDEs provide editing and debugging features specifically for Node.js applications. Such IDEs include Atom, Brackets, JetBrains WebStorm,Node.js, WebStorm supports integration with the Node.js runtime environment, WebStorm HelpRunning and Debugging Node.js, WebStorm Help Microsoft Visual Studio (with Node.js Tools for Visual Studio, or TypeScript with Node definitionssoywiz/typescript-node-definitions TypeScript's typings for some popular node.js modules, GitHubDefinitelyTyped, GitHubImageBoard, A Node.js + Express + MongoDB application built using TypeScript on the server , TypeScript Samples), NetBeans, Nodeclipse Enide Studio, Nodeclipse Website (Eclipse-based) and Visual Studio Code.Hello Visual Studio Code (with NodeJS), Channel 9, MicrosoftNode.js Applications with VS Code, Visual Studio Code Some online IDEs also support Node.js, such as Codeanywhere, Eclipse Che, Cloud9 IDE and the visual flow editor in Node-RED.

Node.js is supported across a number of cloud-hosting platforms such as Jelastic, Google Cloud Platform, AWS Elastic Beanstalk, Azure Web Apps and Joyent.

Releases Major Node.js versions currently enter Current release status for six months. Historically, up to Node.js 26, odd-numbered releases became unsupported after six months, while even-numbered releases moved to Active LTS. Starting with Node.js 27, Node.js is moving to an annual major-release cycle, and every major version is planned to move to LTS after its Current phase and an additional Alpha phase. LTS releases are generally supported for about 30 months, including Active LTS and Maintenance LTS periods. Production applications are recommended to use Active LTS or Maintenance LTS releases.

ReleaseStatusCode nameRelease dateMaintenance end 2013-03-11 2016-10-31 2015-02-06 2016-12-31 Argon 2015-09-08 2018-04-30 2015-10-29 2016-06-30 Boron 2016-04-26 2019-04-30 2016-10-25 2017-06-30 Carbon 2017-05-30 2019-12-31 2017-10-01 2018-06-30 Dubnium 2018-04-24 2021-04-30 2018-10-23 2019-06-01 Erbium 2019-04-23 2022-04-30 2019-10-22 2020-06-01 Fermium 2020-04-21 2023-04-30 2020-10-20 2021-06-01 Gallium 2021-04-20 2023-09-11Bringing forward the End-of-Life Date for Node.js 16, Node.js Website 2021-10-19 2022-06-01 Hydrogen 2022-04-19 2025-04-30 2022-10-18 2023-06-01 Iron 2023-04-18 2026-04-30 2023-10-17 2024-06-01 Jod 2024-04-24 2027-04-30 2024-10-15 2025-06-01 Krypton 2025-04-22 2028-04-30 2025-10-15 2026-06-01 Lithium 2026-05-05 2029 Magnesium 2027 2030 Neon 2028 2031 Oxygen 2029 2032 Platinum 2030 2033

Technical details Node.js is a JavaScript runtime environment that processes incoming requests in a loop, called the event loop.

Internals Node.js uses libuv under the hood to handle asynchronous events. Libuv is an abstraction layer for network and file system functionality on both Windows and POSIX-based systems such as Linux, macOS, OSS on NonStop, and Unix. Node.js relies on nghttp2 for HTTP support. As of version 20, Node.js uses the ada library which provides up-to-date WHATWG URL compliance. As of version 19.5, Node.js uses the simdutf library for fast Unicode validation and transcoding. As of version 21.3, Node.js uses the simdjson library for fast JSON parsing.

Threading Node.js operates on a single-thread event loop, using non-blocking I/O calls, allowing it to support tens of thousands of concurrent connections without incurring the cost of thread context switching. The design of sharing a single thread among all the requests that use the observer pattern is intended for building highly concurrent applications, where any function performing I/O must use a callback. To accommodate the single-threaded event loop, Node.js uses the libuv library—which, in turn, uses a fixed-sized thread pool that handles some of the non-blocking asynchronous I/O operations.