
Loopback
A little background. Loopback is a node based framework for building websites and applications created and maintained by Strongloop. The Strongloop team has provided examples as well as a command line application scaffolding utility to get you up and running quickly. While this scaffold-ed application is full featured and great for getting started. You are still left with an application that was created in 5 minutes. It will need a little thought and work to get it into a real world application.Separating out the pieces
CORE
https://github.com/jsheely/loopback-tri-core The common project will contain all your:- configuration
- models
- common business logic
- common utilities.
API
https://github.com/jsheely/loopback-tri-api In Loopback your API is alot of configuration and convention ontop of your models. Spliting this out into it's own project allows for:- Scale independently
- Simplify your code base
- Streamline middleware
SITE
https://github.com/jsheely/loopback-tri-site Your site is comprised of your server side rendering and client side rendering. It's responsible for:- Server side routing
- Views & Controllers
- Client side application (AngularJS or whatever suits your fancy)
- Node modules
- boot scripts
- exporting module singleton objects (loopback & configuration)
- middleware
- model locations (specifically when utilizing loopback-component-passport)
Setup
Simply clone the API and SITE projects into their own directory. Then you can runnode .
in the api and site directories or create a combination script to start up both
var api = require('./api').loopback; var site = require('./site'); api.start(); site.start();