lib/client.js
function() {
    const query = {clientId};
    var   body  = sg.extend({partnerId, version, sessionId}, {rsvr});

    self.POST('hq', '/clientStart', query, body, function(err, config) {
      //console.log('clientStart-object', query, body, err, config);

      if (sg.ok(err, config)) {
        self.config = sg.deepCopy(config);

        _.each(self.config.upstreams, (upstream, prj_app) => {
          self.upstreams[prj_app] = upstream;
        });

        if (sg.verbosity() > 2) {
          _.each(self.upstreams, (upstream, prj_app) => {
            console.log(`Using upstream: ${sg.lpad(prj_app, 20)} ->> ${upstream}`);
          });
        }

        ctor_callback(err, self.config);
      }

    });
  }
function() {
    const query = {clientId};
    var   body  = sg.extend({partnerId, version, sessionId}, {rsvr});

    self.POST('hq', '/clientStart', query, body, function(err, config) {
      //console.log('clientStart-object', query, body, err, config);

      if (sg.ok(err, config)) {
        self.config = sg.deepCopy(config);

        _.each(self.config.upstreams, (upstream, prj_app) => {
          self.upstreams[prj_app] = upstream;
        });

        if (sg.verbosity() > 2) {
          _.each(self.upstreams, (upstream, prj_app) => {
            console.log(`Using upstream: ${sg.lpad(prj_app, 20)} ->> ${upstream}`);
          });
        }

        ctor_callback(err, self.config);
      }

    });
  }
function ( ) { const query = { clientId } ; var body = sg . extend ( { partnerId , version , sessionId } , { rsvr } ) ; self . POST ( 'hq' , '/clientStart' , query , body , function ( err , config ) { //console.log('clientStart-object', query, body, err, config); if ( sg . ok ( err , config ) ) { self . config = sg . deepCopy ( config ) ; _ . each ( self . config . upstreams , ( upstream , prj_app ) => { self . upstreams [ prj_app ] = upstream ; } ) ; if ( sg . verbosity ( ) > 2 ) { _ . each ( self . upstreams , ( upstream , prj_app ) => { console . log ( ` ${ sg . lpad ( prj_app , 20 ) } ${ upstream } ` ) ; } ) ; } ctor_callback ( err , self . config ) ; } } ) ; }
main for ClientStart ctor
main for ClientStart ctor