This appendix explains some basic concepts around Node and adds extra material that supplements the book’s content.
You’ll notice that we are using ES5 syntax as a base for the code throughout this book. The simple reason is that we wanted to use the more common syntax to ensure that everyone is able to comfortably read through this book.
We highly encourage you to try out ES6 by using compilers/transpilers such as Babel. Node is slowly adopting ES6—in the meantime, you can prepare your application and ensure that you are ready to deploy to production when ES6 is fully supported.
This book assumes a working Node.js environment and the ability to install various modules using npm. This section runs through setting up Node in order to ensure that you will be able to follow the book.
First, install Node by either downloading and running the installer from nodejs.org’s Downloads section or leveraging a package manager such as brew, pacman, or apt-get. Verify that the installation worked by typing
which node or
node -v into your terminal—this should display either the path to your node executable or your local node version.
The download from nodejs.org always serves the most recent stable version of Node and should be favored over alternative ways of installing Node whenever possible.
Once Node is set up, you can proceed with installing Express by utilizing
npm. To see if ...