DEV_TOOLBOX

Node

Node is a JavaScript runtime environment that can execute JavaScript code. It is used to run JavaScript code on the server-side.

Installation

To install Node, you can the following command which uses nvm

nvm install lts
nvm use lts
# or to install a specific version
nvm install 16.13.0
nvm use 16.13.0

Usage & Commands

Node is mainly used to run JavaScript code.

// main.js
console.log('Hello, World!');

Then run the following command to execute the JavaScript code:

node main.js