if(config.enableStats){conststatsApp=express();conststatsPort=process.env.STATS_PORT||8080;conststatsMiddleware=ext.statsMiddleware();// Add the middleware to both express servers. Otherwise API tracking will not work.app.use(statsMiddleware);statsApp.use(statsMiddleware);statsApp.set('port',statsPort);log.info('Starting stats web services...');statsApp.get('/',function(req,res,next){res.redirect('stats');});conststatsServer=statsApp.listen(statsApp.get('port'),()=>{log.info(`Stats server listening on port ${statsServer.address().port}.`);});}