Node.js is an open-source, cross-platform JavaScript run-time environment that executes JavaScript code server-side.  Node.js runs on various platforms (Windows, Linux, Unix, Mac OS X, etc.) and uses JavaScript on the server. Corporate users of Node.js software include GoDaddy, Groupon, IBM, LinkedIn, Microsoft, Netflix, PayPal, Rakuten, SAP, Tuenti, Voxer, Walmart, and Yahoo!. It allows the creation of Web servers and networking tools using JavaScript and a collection of "modules" that handle various core functionality. Modules are provided for file system I/O, networking, binary data, cryptography functions, data streams, and other core functions. Node.js's modules use an API designed to reduce the complexity of writing server applications.

npm is a package manager for the JavaScript programming language.It consists of a command line client, also called npm, and an online database of public and paid-for private packages called the npm registry. The registry is accessed via the client, and the available packages can be browsed and searched via the npm website. The package manager and the registry are managed by npm, Inc.

Install Node.js and NPM

If you want to install Node.js 8 and NPM 5 you have to install them via RPM/DEB packages.

On Debian 8 and Ubuntu 16

Execute following commands one by one to install Node.JS 8 on Debian and Ubuntu:

apt-get update

apt-get install curl sudo

curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash -

Now you can install Node.js and NPM easily by typing:

apt-get install nodejs

You can check the version of your Node.js and NPM with:

nodejs -v

v8.9.0

npm -v

5.5.1

On CentOS 7

Issue the following commands to install Node.JS and NPM on your CentOS:

curl -sL https://rpm.nodesource.com/setup_8.x | bash -

yum install nodejs

It’s done, check the version of Node.js and NPM:

nodejs -v

v8.9.0

npm -v

5.5.1




Was this answer helpful? 0 Users Found This Useful (0 Votes)