DEV Community

Hunt Navar
Hunt Navar

Posted on



When one starts their journey into backend development, there is no doubt they will come across Node.js and Express. Express being an extremely popular web application framework is commonly the go to for developing new and existing applications. Express makes it easy to cut out much of the daunting code that writing raw Node.js requires. This being said, the task of creating your CRUD operations will always exist and if you have not created these I would suggest looking into it before continuing this article.

Once you understand the fundamentals of Node and Express, there is an incredible web framework that runs on top of both of these different software. Here approaches Loopback.

Loopback is an NPM package that allows for the quick composition of the important CRUD API's that every developer will eventually have to produce.

The first step of getting started with Loopback is to use the
simple command:

sudo npm install -g loopback-cli

After this command you will be prompted to name your project, and should enter the command:


which will create a file structure that looks like this: Image description

The client folder will be for our Frontend work exist and our server.js file will contain our Backend work.

The next step will consist of a prompt asking for your data source, which will create a datasource.json file.

Now we can edit model-config.json to use the any created datasource instead of default one which will be labeled as db.

This is the beginning of Loopback but the true magic of the software begins when you start create your models. When utilizing loopback, creating models is as easy as typing in:

lb model

You will then prompted enter details about your model, and depending what you have chosen/selected, the crud applications needed will be AUTOMATICALLY generated.

This is the beauty of Loopback. While generally these Api's would have to be tediously written, this framework will automatically create many of them with your selected end point!

In conclusion Loopback is a low learning curve Backened framework that drastically speeds up the development process. I highly suggest going to create a simple project to checkout the many options this software brings.


Top comments (0)

12 Rarely Used Javascript APIs You Need

Practical examples of some unique Javascript APIs that beautifully demonstrate a practical use-case.