_initAdminServer(config, cb) {
    const app = express();
    app.disable('x-powered-by');
    app.use(bodyParser.urlencoded({extended: true}));

    const routesConfig = {ChatServer: this, key: config.ADMIN_KEY, ...Common.headers};
    app.use('/api/v1/', adminRoutes(routesConfig));
    this.adminApp = app;

    this.adminServer = http.createServer(app).listen(config.ADMIN_PORT, () => {
      // eslint-disable-next-line max-len
      console.log(`Admin for ${config.APPNAME} ${config.VERSION} in ${config.NODE_ENV} listening at http://0.0.0.0:${this.adminServer.address().port}`);
      cb();
    });
  }
/** Starts a server listening on an admin port. On success the chatserver is started
   * @param  {object} config
   * @param {Function} cb Callback to start chatserver
   */
Starts a server listening on an admin port. On success the chatserver is started
@param  {object} config
@param {Function} cb Callback to start chatserver
Starts a server listening on an admin port . On success the chatserver is started @param { object } config @param { Function } cb Callback to start chatserver
_initAdminServer(config, cb) {
    const app = express();
    app.disable('x-powered-by');
    app.use(bodyParser.urlencoded({extended: true}));
    const routesConfig = {ChatServer: this, key: config.ADMIN_KEY, ...Common.headers};
    app.use('/api/v1/', adminRoutes(routesConfig));
    this.adminApp = app;
    this.adminServer = http.createServer(app).listen(config.ADMIN_PORT, () => {
      console.log(`Admin for ${config.APPNAME} ${config.VERSION} in ${config.NODE_ENV} listening at http://0.0.0.0:${this.adminServer.address().port}`);
      cb();
    });
  }
_initAdminServer ( config , cb ) { const app = express ( ) ; app . disable ( 'x-powered-by' ) ; app . use ( bodyParser . urlencoded ( { extended : true } ) ) ; const routesConfig = { ChatServer : this , key : config . ADMIN_KEY , ... Common . headers } ; app . use ( '/api/v1/' , adminRoutes ( routesConfig ) ) ; this . adminApp = app ; this . adminServer = http . createServer ( app ) . listen ( config . ADMIN_PORT , ( ) => { console . log ( ` ${ config . APPNAME } ${ config . VERSION } ${ config . NODE_ENV } ${ this . adminServer . address ( ) . port } ` ) ; cb ( ) ; } ) ; }
Starts a server listening on an admin port.
Starts a server listening on an admin port .
// eslint-disable-next-line max-len