bootstarp.js 475 Bytes

// app - routes

var bootable = require('bootable');

exports = module.exports = function (IoC, settings) {

  var app = this;

  //auth
  app.phase(bootable.di.routes('./routes/auth.js'));

  //api
  app.phase(bootable.di.routes('./routes/api.js'));


  // error handler (always keep this last)
  app.phase(function () {
    var errorHandler = IoC.create('igloo/error-handler');
    app.use(errorHandler);
  });

};

exports['@require'] = ['$container', 'igloo/settings'];