Time for action – installing Node.js
Go to the URL, http://nodejs.org, which contains the source code of the Node.js server.
Click on the Install button on the page. This downloads the installation package based on your operating system.
Follow the installer's instructions to install the Node.js package. After the installation, we can check whether Node.js is installed by checking its version with the following command:
$ node --version
The preceding command should print a version number of the node.js. In my case, it is version 0.12.0:
v0.12.0
We also need to check whether the
npm
package manager is installed with the following command:$ npm --version
The preceding command should print a version number of npm, Node.js packages manager. In my case, it is version 2.5.1.
What just happened?
We just downloaded and installed the Node.js
server. We will build server logic on top of this environment. The WebSocket server does not necessarily run on Node.js. There are different server-side implementations...