Skip to content
This repository was archived by the owner on Apr 18, 2020. It is now read-only.

Application structure

Rand McKinney edited this page Apr 7, 2014 · 8 revisions

The structure of a full-stack LoopBack app is:

  • API server - api directory contains code for a "standard LoopBack" app.
    • app.api.js - main app file
    • configure.js - configuration settings, for example hostname and port, database logins, and so on.
    • package.json
  • Model Definitions - models directory contains "standard LoopBack" model definitions.
    • index.js - Defines each model using the JS files in this directory, for example: exports.Todo = require('./todo');
    • One JS file to define each model with loopback.DataModel.extend(); for example todo.js.
    • package.json - (Not sure why this is needed here?)
  • html5 (angular or whatever)
    • app.html5.js - main file
    • configure.js - gulp build file (?)
  • web ** app.js - defines routes (what else?) ** Views - contains template files, such as .ejs. **

Clone this wiki locally