middleware/mw.service.init.js
function initAdapters(container) {

        var calls = [];

        if (container === 'webserver') {
            _.each(adapters, function (adapter) {
                if (adapter.webInit) {
                    calls.push(adapter.webInit);
                }
            });
        }
        else {
            _.each(adapters, function (adapter) {
                if (adapter.init) {
                    calls.push(adapter.init);
                }
            });
        }

        return chainPromises(calls, config)
            .then(function (returnConfig) {
                if (returnConfig) {
                    return returnConfig;
                }
                else {
                    throw new Error('An adapter in the chain is not returning the config.');
                }
            });
    }
function initAdapters(container) {

        var calls = [];

        if (container === 'webserver') {
            _.each(adapters, function (adapter) {
                if (adapter.webInit) {
                    calls.push(adapter.webInit);
                }
            });
        }
        else {
            _.each(adapters, function (adapter) {
                if (adapter.init) {
                    calls.push(adapter.init);
                }
            });
        }

        return chainPromises(calls, config)
            .then(function (returnConfig) {
                if (returnConfig) {
                    return returnConfig;
                }
                else {
                    throw new Error('An adapter in the chain is not returning the config.');
                }
            });
    }
function initAdapters ( container ) { var calls = [ ] ; if ( container === 'webserver' ) { _ . each ( adapters , function ( adapter ) { if ( adapter . webInit ) { calls . push ( adapter . webInit ) ; } } ) ; } else { _ . each ( adapters , function ( adapter ) { if ( adapter . init ) { calls . push ( adapter . init ) ; } } ) ; } return chainPromises ( calls , config ) . then ( function ( returnConfig ) { if ( returnConfig ) { return returnConfig ; } else { throw new Error ( 'An adapter in the chain is not returning the config.' ) ; } } ) ; }
Initialize the adapters as long as the container is no webserver

@param container
@returns {*}
Initialize the adapters as long as the container is no webserver