Setup a loopback project
Setup a loopback project
Login to your cloud-box over
ssh
.Create it if you haven't done so already.
This will be a robust environment for learning.
Let's setup a loopback project on the [cloud-box]:
It will just a short while to finish.
What just happened?
A minimal set of files was placed in the
loopback-zero-to-hero
directory to facilitate your project development. Andnpm install
was auto run as part of project setup.Let's take the time to understand our directory structure:
The
client
folder is meant to house the source code for your project's frontend/UI. If you look at it right now, it has nothing but a README file:for all intents and purposes, it can simply be considered empty.
The
node_modules
folder contains dependencies which were installed based on what's listed in thepackage.json
file. If you are unfamiliar with this concept, you will need to brush up on the basics of NodeJS and the purpose ofpackage.json
file.The
server
folder contains the bulk of your server-side logic which is where LoopBack shines! Take a peek:boot
folder containsjs
files which will be run (alphabetically by default) when loopback startssome configuration files that will be easier to understand if we explain them in sections that follow
server.js
file is the entry-point for launching loopback. Just like any NodeJS application, you can run it withnode path/to/file.js
:press
ctrl+c
to exit.
Last updated