
Full-Stack Web Development with GraphQL and React
By :

The first step of preparing our project is to install Node.js. There are two ways to do this:
Note
You can find the Downloads section of Node.js at the following link: https://nodejs.org/en/download/.
We are going to be using the second option here. It covers the regular server configurations and is easy to understand. I will keep this as short as possible and skip all the other options, such as Chocolatey for Windows and Brew for Mac, which are very specialized for those specific operating systems.
I assume that you are using a Debian-based system for ease of use with this book. It has got the normal APT package manager and repositories for easily installing Node.js and MySQL. If you are not using a Debian-based system, you can look up the matching commands to install Node.js at https://nodejs.org/en/download/package-manager/.
Our project is going to be new so that we can use Node.js 14, which is the current LTS version:
curl -fsSL https://deb.nodesource.com/setup_14.x | sudo bash -
apt-get install -y nodejs build-essential
node --version
Note
Installing Node.js via the package manager will automatically install npm.
Great! You are now set to run server-side JavaScript with Node.js and install Node.js modules for your projects with npm.
All the dependencies that our project relies on are available at https://npmjs.com and can be installed with npm or Yarn. We will rely on npm as it is more widely used than Yarn. So, let's continue and start using npm to set up our project and its dependencies.