Preparing your environment
Before we can get started with the first bot, the programming environment must be set up and configured to run Node.js applications and packages. Let's start at the very beginning with Node.
In brief, Node.js (also referred to as Node) is a JavaScript runtime built on Chrome's v8 JavaScript Engine. In practice, this means that JavaScript can be run outside of the usual browser environment, making JavaScript both a frontend and backend language.
Google Chrome's v8 JavaScript engine ensures that your JavaScript code runs fast and efficiently. Unlike in the world of browsers (and excepting Node versions), Node is maintained by a single open source foundation with hundreds of volunteer developers. This makes developing for Node much simpler than for browsers as you will not run into problems with varying JavaScript implementations across platforms.
In this book, we will be using major Version 5 (any version starting with 5) of Node. This allows us to use the newly implemented...