Build a Node.js REST API with LoopBack

In this course the developer will learn how to create a LoopBack API and build it out to an API that can be used as a backend for apps. We will start by creating a basic LoopBack API project and gradually enhance it to a production ready API. The API we create defines a few models to persist the data and has custom functionality, validation and hooks added to those models.

After our data structure is defined we will learn how to extend the functionality of LoopBack by using mixins and components. We will also lock our API down using ACL’s and create a mechanism to automatically define the admin and user roles and create our admin user.

The last part of the course will show how how to filter the data stored in the API. We will make the API production-ready by adding unit tests, connecting it to MongoDB and we will show how to deploy the app to now.sh.

Watch User Created Playlist (3)

This playlist is user created.

pro-course-rss-logo

PRO RSS Feed

Initialize a LoopBack Node.js Project through the CLI

Create a model to persist data in a Node.js LoopBack API

Persist in-memory data to a file when developing Node.js LoopBack API's

P
loopback tutorial about Initialize a LoopBack Node.js Project through the CLI

Initialize a LoopBack Node.js Project through the CLI

1:17 loopback

LoopBack is a framework built on top of Express for creating APIs. It allows you to create end-to-end REST APIs that can access data from many data sources such as MondoDB, PostgreSQL, MySQL or other REST APIs.

In this lesson you will learn how to install loopback-cli and create a new LoopBack API project. After creating the basic LoopBack project through the CLI, running the server will give us access to the project and API Explorer urls. The user model will be available to us because user authentication was enabled.

loopback tutorial about Create a model to persist data in a Node.js LoopBack API

Create a model to persist data in a Node.js LoopBack API

3:01 loopback

In this lesson you will learn what a LoopBack model is, you will create a Product model using the LoopbBack CLI. The product model will be based off the built-in PersistedModel which gives it basic functionality like Create, Ready, Update, Delete and some more. Using the API Explorer you can interact with the new model, store, retrieve, edit and delete the product data.

loopback tutorial about Persist in-memory data to a file when developing Node.js LoopBack API's

Persist in-memory data to a file when developing Node.js LoopBack API's

0:43 loopback PRO

In this lesson you will learn how to persist the data from the memory connector. As the name suggests, the memory connector stores the data in memory. This means that if you restart the server, the data is gone. In development mode it can be useful to store this data in a file, so it gets persisted between server restarts, and it can be easily inspected.

HEY, QUICK QUESTION!
Joel's Head
Why are we asking?