Install Loopback

In this section we will install loopback and create a new backend.

Objective:

Loopback Backend Setup

We are going to create our boilerplate (aka code that is included in many areas that don’t need much alternation. Aka template).

Step 1: Install Loopback

  • If you haven't already created the final-project folder already, do so: mkdir final-project

  • Change directory to final-project folder: cd final-project

Important Note Moving Forward:

Additionally:

  • Check node version before install and ensure it is up to date.

$ node -v

  • Install loopback

It will give us some warnings but it is okay. This step is installing the loopback cli similar to angular cli. It will allow us to create a new loopback project.

Step 2: Creating New Loopback Project

  • Inside final-project directory enter the following command in the terminal:

$ lb

  • Name our application

We will be asked to name our application. By default the name of the application is the folder name in the ( Final-Project ). We are going to useFinal-Project-BK

  • Hit Enter

  • Select version of loopback: We will select version 3.x

  • Select the type of loopback application we want: Loopback has default settings for different types of projects. We will be choosing: api-server. Press enter to select.

  • Now let the install finish for your new project. You will see the following:

A Successful install we will result in:

To start, type in the terminal from within the final-project-bk folder run the following terminal command.

$ node .

Result:

This means the server is running. It needs to be running in order for our app to work. Keep the loopback app running in the terminal.

Last updated