Generated by DeepSeek V3.2| Node.js | |
|---|---|
| Name | Node.js |
| Developer | OpenJS Foundation |
| Released | 27 May 2009 |
| Programming language | C++, JavaScript, Python |
| Operating system | Linux, macOS, Microsoft Windows, FreeBSD, OpenBSD |
| Genre | Runtime system |
| License | MIT License |
Node.js. Node.js is an open-source, cross-platform JavaScript runtime environment built on Chrome's V8 JavaScript engine. It enables developers to execute JavaScript code server-side, moving beyond its traditional role within web browsers. The platform utilizes an event-driven architecture and a non-blocking I/O model, making it efficient for building scalable network applications. Its development is overseen by the OpenJS Foundation, with significant contributions from IBM, Microsoft, and a vast community of individual developers.
Node.js represents a paradigm shift for JavaScript, extending its execution from the client-side DOM of a web browser to server-side scripting and general-purpose programming. The core philosophy emphasizes asynchronous programming to handle multiple operations concurrently without creating multiple threads, contrasting with traditional models like those in Apache HTTP Server. This approach is particularly well-suited for data-intensive real-time applications that run across distributed devices. The runtime includes a built-in package manager called npm, which hosts the world's largest ecosystem of open-source libraries.
The architecture is centered on a single-threaded event loop that manages all asynchronous operations, delegating tasks to the libuv library for handling file system, DNS, network, and other I/O-bound work. The V8 engine, originally developed by Google for Google Chrome, compiles and executes the JavaScript code at high speed. Critical system operations are implemented in C++ as native modules, providing bindings to lower-level system APIs. This design avoids the overhead of thread creation and context-switching, favoring an event-driven model where callbacks are invoked upon task completion.
Key features include a non-blocking, event-driven I/O model that ensures high throughput and scalability for applications like WebSockets and API servers. It provides a comprehensive set of core modules for working with the file system, HTTP and HTTPS protocols, cryptography, and data streams. The runtime supports CommonJS modules, allowing for modular code organization through `require()` statements, a system later enhanced by ECMAScript modules. Its ability to use the same language on both the client and server, often referred to as full-stack JavaScript, simplifies development for teams familiar with JavaScript.
Node.js is extensively used for building fast and scalable network applications, particularly web applications and API services like those offered by Netflix, Uber, and PayPal. It is the foundation for many real-time services such as chat applications, collaborative tools, and online gaming servers due to its efficient handling of persistent connections. The platform is also popular for developing microservices architectures, IoT backends, and command-line tools. Tools like webpack and Babel in the modern front-end web development workflow are themselves built using it.
Node.js was created by Ryan Dahl in 2009, with his initial presentation highlighting the performance limitations of Apache HTTP Server for concurrent connections. The project gained rapid adoption, leading to the creation of the npm package manager by Isaac Z. Schlueter in 2010. A major fork named io.js occurred in 2014 due to disagreements over governance and release cycles; this fork was later reconciled with the main project under the stewardship of the newly formed Node.js Foundation in 2015. In 2019, the Node.js Foundation merged with the JS Foundation to form the OpenJS Foundation, which currently oversees its development.
The ecosystem is dominated by npm, the default package manager, which hosts millions of reusable packages, including frameworks like Express.js, NestJS, and Koa. Development tools such as Nodemon, testing frameworks like Jest and Mocha, and TypeScript compilers are integral parts of the workflow. Major cloud platforms, including AWS, Microsoft Azure, and Google Cloud Platform, offer first-class support for deploying Node.js applications. The community also maintains long-term support (LTS) release schedules, providing stability for enterprise adoption by companies like IBM and Walmart.
Category:Free software programmed in C++ Category:Free software programmed in JavaScript Category:JavaScript programming language family Category:Server-side software