Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Full-Stack Web Development with Vue.js and Node

You're reading from   Full-Stack Web Development with Vue.js and Node Build scalable and powerful web apps with modern web stack: MongoDB, Vue, Node.js, and Express

Arrow left icon
Product type Paperback
Published in May 2018
Publisher Packt
ISBN-13 9781788831147
Length 366 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Author (1):
Arrow left icon
Aneeta Sharma Aneeta Sharma
Author Profile Icon Aneeta Sharma
Aneeta Sharma
Arrow right icon
View More author details
Toc

Table of Contents (12) Chapters Close

Preface 1. Introducing MEVN FREE CHAPTER 2. Building an Express Application 3. Introducing MongoDB 4. Introducing REST APIs 5. Building the Real Application 6. Building Authentication with passport.js 7. Building OAuth Strategies with passport.js 8. Introducing Vuex 9. Testing an MEVN Application 10. Going Live 11. Other Books You May Enjoy

Installing Node.js

To get started, we need to add all the dependencies that are required for an MEVN stack application. We can also refer to the documentation on the official website (https://nodejs.org/) for details on how to install Node.js in any operating system. 

Installing Node.js on macOS

There are two ways to install Node.js on macOS: using the installer or using the bash.

Installing Node.js using the installer

To install Node.js using the installer, perform the steps:

  1. Install the installer: We can download the installer for macOS from the official website's download page (https://nodejs.org/en/#download). We will be installing the latest node version, which is 10.0.0. You can install any node version you want, but the application that we will be building in this book will require the node version >= 6.0.0. Run the installer and follow the instructions given. When we download and run the installer, we will be prompted with the following dialog box:
  1. Just hit Continue until the installation finishes. Once the installation is complete, we will be able to see the following dialog box:

Just hit Close and we will be done.

Installing Node.js using the bash

Node.js can be easily installed using Homebrew in macOS. Homebrew is a free and open source software package manager that is used to install software on macOS. I personally prefer Homebrew because it makes it very easy to install different software on Mac:

  1. To install Homebrew, type the following command:
$ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
  1. Now, use Homebrew to install Node.js with the following command:
$ brew install node

Installing Node.js on Linux

For Linux, we can either install the default distribution of Node.js or we can download it from NodeSource to use the latest version.

Installing Node.js from the default distribution

To install from the default distribution, we can install Node.js on Linux by using this command:

$ sudo apt-get install -y nodejs

Installing Node.js from NodeSource

To install Node.js from NodeSource, perform the following steps:

  1. First download the latest version of Node.js from NodeSource:
$ curl -sL https://deb.nodesource.com/setup_9.x | sudo -E bash 
  1. Then, install Node.js with the command:
$ sudo apt-get install -y nodejs
The apt is a short form of Advanced Package Tool that is used to install software on Debian and Linux distributions. Basically, this is equivalent to the Homebrew command in macOS.

Installing Node.js on Windows

We can install Node.js on Windows by following these steps:

  1. Download the Node.js installer from the official website (https://nodejs.org/en/download/)
  2. Run the installer and follow the given instructions
  3. Click on the Close/Finish button

Installing Node.js for Windows via an installer is almost the same as on macOS. Once we download and run the installer, we will be prompted with a dialog box. Just click on Continue until the installation completes. When we finally see a dialog with a confirmation, we hit Close. Node.js will be installed!

You have been reading a chapter from
Full-Stack Web Development with Vue.js and Node
Published in: May 2018
Publisher: Packt
ISBN-13: 9781788831147
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image