Text Editor & The Node.js binary installable
Debian
sudo apt-get update
sudo apt-get install nodejs
sudo apt-get install npm
sudo ln -s /usr/bin/nodejs /usr/bin/node
Redhat
sudo yum install epel-release
sudo yum install nodejs
sudo yum install npm
: Create a JavaScript file named main.js on your machine (Windows or Linux) having the following code.
main.js
console.log("Hello, Node.js!")
Execute main.js file using Node.js interpreter to see the result
$node main.js
Result
Hello, Node.js!