The Node.js Runtime Environment
Node.js·5 min read·Jan 1, 2025
JavaScript, often abbreviated as JS, is a high-level, multi-paradigm, and interpreted programming language that conforms to the ECMAScript standard.
It was initially developed for client-side scripting within web browsers to enhance the interactivity and functionality of web pages that HTML and CSS alone couldn't provide, by allowing them to dynamically change their content after they are loaded.
Nowadays, the usage of JavaScript extends way beyond web browsers, as it is also used for building complex web applications using frameworks like React and Angular, mobile and desktop applications using technologies like React Native and Electron, and server-side applications running in runtime environments like Node.js.
The Node.js runtime environment
Node.js is a runtime environment built on Google's V8 JavaScript engine that allows developers to interpret and execute JavaScript code directly from the command-line interface instead of a web browser.
Its event-driven and non-blocking I/O model allows it to handle many concurrent connections efficiently, which makes it well suited for building scalable, high-performance backend applications like web servers or streaming services.
Beyond that, Node.js provides a set of core modules that are not natively present in JavaScript and that include all sorts of functionalities necessary for creating server-side applications, such as file system operations, networking, data streams, and more, which are completed by a vast ecosystem of third-party modules available through the npm registry.
Installing Node.js
The Node Version Manager (NVM) is a command-line tool that allows developers to easily manage multiple installations of Node.js on a single system.
To download and install NVM, you can use the following curl command:
$ curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bashOnce downloaded, you can install the latest version of Node.js (currently version 20) using the nvm install command:
$ nvm install 20Once installed, you can verify that your Node.js installation works by outputting its current version number using the node -v command:
$ node -vv20.3.0Unlock the Build CLI Apps in JavaScript & Node.js module
Learn how to build, integrate, and safeguard scalable CLI tools, scripts, and apps with JavaScript, Node.js, npm, and Git.
You get immediate access to:
- 45 focused lessons across JavaScript, Node.js, npm, and Git
- 17 real-world projects with commented solutions
- Ongoing updates to this bundle
- Lifetime access to this bundle