Node.js was written initially by Ryan Dahl in 2009, about thirteen years after the introduction of the first
Mac OS X. Its development and maintenance was led by Dahl and later sponsored by Joyent.
Dahl criticized the limited possibilities of the most popular web server in 2009, Apache
HTTP Server, to handle a lot of concurrent connections (up to 10,000 and more) and the most common way of creating code (sequential programming), when code either blocked the entire process or implied multiple execution stacks in the case of simultaneous connections.
In January 2010, a package manager was introduced for the Node.js environment called
npm. The package manager makes it easier for programmers to publish and share source code of Node.js packages and is designed to simplify installation, updating, and uninstallation of packages.
(DNS, HTTP, TCP, TLS/SSL, or UDP), binary data (
buffers), cryptography functions, data
streams, and other core functions. Node.js’s modules use an API designed to reduce the complexity of writing server applications.
ClojureScript and others.
Node.js is primarily used to build network programs such as Web servers. The most significant difference between
PHP is that most functions in PHP block until completion (commands only execute after previous commands finish), while Node.js functions are non-blocking (commands execute concurrently or even in parallel, and use callbacks to signal completion or failure).
Node.js is officially supported on Linux, macOS 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 available for IBM i (AS/400). The provided source code may also be built on similar operating systems to those officially supported or be modified by third parties to support others such as NonStop OS and Unix servers.