Please omit the boilerplate code to keep the example short.

Example:

```js
myAsyncThing.run(function(metadata) {
  // Configure LoopBack models and datasources
  app.boot(__dirname);

  //use the model metadata to introspectively register new models
  myAsyncThing.buildModels(metadata);

  // other configuration as scaffolded by `slc lb project`
  app.use(loopback.favicon());
  // etc.
  app.enableAuth();
 
  //app API is ready to go -- time to alert anyone who cares (lookin' at you grunt-loopback-angular)
  doOnReady();

  if(require.main === module) {
    // start the http server
  }
});
```