middleware/mw.app.context.js
function setContext(req) {
        var session = cls.getNamespace('appSession');
        var appName = req.app.name;

        if (session && session.active) {
            session.set('app', appName);
            session.set('lang', req.app.lang);
            session.set('url', routeHelper.getBaseUrl(appName) + req.url.path);
        }
    }
function setContext(req) {
        var session = cls.getNamespace('appSession');
        var appName = req.app.name;

        if (session && session.active) {
            session.set('app', appName);
            session.set('lang', req.app.lang);
            session.set('url', routeHelper.getBaseUrl(appName) + req.url.path);
        }
    }
function setContext ( req ) { var session = cls . getNamespace ( 'appSession' ) ; var appName = req . app . name ; if ( session && session . active ) { session . set ( 'app' , appName ) ; session . set ( 'lang' , req . app . lang ) ; session . set ( 'url' , routeHelper . getBaseUrl ( appName ) + req . url . path ) ; } }
Set the context into CLS for later usage
@param req
Set the context into CLS for later usage