<commit_before>'use strict';
var msb = require('msb');
var app = exports;

app.config = require('./lib/config');

app.start = function(cb) {
  var RouterWrapper = require('./lib/routerWrapper').RouterWrapper;
  app.router = new RouterWrapper();

  app.router.load(app.config.routes);

  app.createServer()
  .listen(app.config.port)
  .once('listening', function() {
    app.config.port = this.address().port;

    if (cb) { cb(); }
    console.log('http2bus listening on ' + app.config.port);
  });
};

app.createServer = function() {
  var http = require('http');
  var finalhandler = require('finalhandler');<commit_msg>Ensure channelMonitorAgent is started<commit_after>'use strict';
var msb = require('msb');
var app = exports;

app.config = require('./lib/config');

app.start = function(cb) {
  if (app.config.channelMonitorEnabled) msb.channelMonitorAgent.start();

  var RouterWrapper = require('./lib/routerWrapper').RouterWrapper;
  app.router = new RouterWrapper();

  app.router.load(app.config.routes);

  app.createServer()
  .listen(app.config.port)
  .once('listening', function() {
    app.config.port = this.address().port;

    if (cb) { cb(); }
    console.log('http2bus listening on ' + app.config.port);
  });
};

app.createServer = function() {
  var http = require('http');
  var finalhandler = require('finalhandler');
{'fraction_non_alphanumeric': 0.17485119047619047, 'fraction_numerical': 0.001488095238095238, 'mean_word_length': 4.25390625, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3235456', 'n_tokens_mistral': 433, 'n_tokens_neox': 428, 'n_words': 85}