app/bin/router.js
function TrinteBridge(namespace, controller, action) {
    var responseHandler;
    if (typeof action === 'function') {
        return action;
    }
    try {
        if (/\//.test(controller)) {
            var cnts = controller.split('/');
            namespace = cnts[0] + '/';
            controller = cnts[1];
        }
        namespace = typeof namespace === 'string' ? namespace.toString().toLowerCase() : '';
        controller = controller.pluralize().capitalize();
        var crtRoot = './../app/controllers/';
        ['', 'es', 'ses'].forEach(function (prf) {
            var ctlFile = crtRoot + namespace + controller + prf + 'Controller';
            if (fileExists(path.resolve(__dirname, ctlFile) + '.js')) {
                responseHandler = require(ctlFile)[action];
            }
        });
    } catch (e) {
        // console.log( 'Error Route Action: ' + action );
        console.log(e);
    }
    if (!responseHandler) console.log('Bridge not found for ' + namespace + controller + '#' + action);
    return responseHandler || function (req, res) {
            res.send('Bridge not found for ' + namespace + controller + '#' + action);
        };
}
function TrinteBridge(namespace, controller, action) {
    var responseHandler;
    if (typeof action === 'function') {
        return action;
    }
    try {
        if (/\//.test(controller)) {
            var cnts = controller.split('/');
            namespace = cnts[0] + '/';
            controller = cnts[1];
        }
        namespace = typeof namespace === 'string' ? namespace.toString().toLowerCase() : '';
        controller = controller.pluralize().capitalize();
        var crtRoot = './../app/controllers/';
        ['', 'es', 'ses'].forEach(function (prf) {
            var ctlFile = crtRoot + namespace + controller + prf + 'Controller';
            if (fileExists(path.resolve(__dirname, ctlFile) + '.js')) {
                responseHandler = require(ctlFile)[action];
            }
        });
    } catch (e) {
        // console.log( 'Error Route Action: ' + action );
        console.log(e);
    }
    if (!responseHandler) console.log('Bridge not found for ' + namespace + controller + '#' + action);
    return responseHandler || function (req, res) {
            res.send('Bridge not found for ' + namespace + controller + '#' + action);
        };
}
function TrinteBridge ( namespace , controller , action ) { var responseHandler ; if ( typeof action === 'function' ) { return action ; } try { if ( / \/ / . test ( controller ) ) { var cnts = controller . split ( '/' ) ; namespace = cnts [ 0 ] + '/' ; controller = cnts [ 1 ] ; } namespace = typeof namespace === 'string' ? namespace . toString ( ) . toLowerCase ( ) : '' ; controller = controller . pluralize ( ) . capitalize ( ) ; var crtRoot = './../app/controllers/' ; [ '' , 'es' , 'ses' ] . forEach ( function ( prf ) { var ctlFile = crtRoot + namespace + controller + prf + 'Controller' ; if ( fileExists ( path . resolve ( __dirname , ctlFile ) + '.js' ) ) { responseHandler = require ( ctlFile ) [ action ] ; } } ) ; } catch ( e ) { // console.log( 'Error Route Action: ' + action ); console . log ( e ) ; } if ( ! responseHandler ) console . log ( 'Bridge not found for ' + namespace + controller + '#' + action ) ; return responseHandler || function ( req , res ) { res . send ( 'Bridge not found for ' + namespace + controller + '#' + action ) ; } ; }
Some TrinteBridge method that will server requests from
routing map to application

@param {String} namespace
@param {String} controller
@param {String} action
@return {Function} responseHandler
Some TrinteBridge method that will server requests from routing map to application