middleware/mw.service.init.js
function init(ctx) {
        var container = ctx.container;

        // reactors can be initialized without a promise since just attaching event handlers
        initReactors(container);

        // adapters and services may be making database calls, so do with promises
        return initAdapters(container)
            .then(function () {
                return initServices(container);
            })
            .then(function () {
                return ctx;
            });
    }
function init(ctx) {
        var container = ctx.container;

        // reactors can be initialized without a promise since just attaching event handlers
        initReactors(container);

        // adapters and services may be making database calls, so do with promises
        return initAdapters(container)
            .then(function () {
                return initServices(container);
            })
            .then(function () {
                return ctx;
            });
    }
function init ( ctx ) { var container = ctx . container ; // reactors can be initialized without a promise since just attaching event handlers initReactors ( container ) ; // adapters and services may be making database calls, so do with promises return initAdapters ( container ) . then ( function ( ) { return initServices ( container ) ; } ) . then ( function ( ) { return ctx ; } ) ; }
Initialize all the reactors, adapters and services
@returns {Q}
Initialize all the reactors adapters and services