strongloop/loopback — pull request #101 by ritch (2013-12-18 03:21:03+00:00)
Title: app.boot() now loads the "boot" directory

/to @bajtos
/cc @sam-github @raymondfeng

The idea here is pretty straightforward. We load any `.js` scripts in the `boot` directory before we load any in the `models` directory. Its useful for the following cases.

- Setup anything your app needs directly after it is booted
- Run your own boot specific scripts without modifying `app.js`

The issue I'm still thinking about is what exact order makes sense. Where I've landed is that we need a set of events instead of enforcing any order on loaded scripts. This means that the splitting up of `boot` and `models` is mostly semantic. Anything you could do in a `boot` script you could just do in a `models` script.