<commit_before>var path = require('path');
var express = require('express');
var gzippo = require('gzippo');
var irc = require('irc');
var ms = require('ms');
var stringifyObject = require('stringify-object');

var logger = require('./core/logger').logger;

var root = path.dirname(__dirname);

var connectToIRC = function(config) {
  var bot = config.account;
  var client = new irc.Client(config.irc.address, bot.username, {
    userName: bot.username,
    realName: bot.username,
    port: 6667,
    password: <PASSWORD>,
    showErrors: true,
    channels: [bot.channel],
    stripColors: true
  });
  client.addListener('error', function(error) {
    var message = stringifyObject(error, {
      indent: '  ',
      singleQuotes: false
    });
    logger.error(message);
  });
  logger.info('Connected to IRC server ' + config.irc.address + ' and joined channel ' + bot.channel + ' as ' + bot.username + '.');
};

var createApp = function(config) {
  var publicPath = path.join(root, 'public');
  var viewsPath = path.join(root, 'views');

  var gzipCacheAge = ms(config.server.cacheAge);

  var app = express();

  app
    .set('view engine', 'jade')
    .set('views', viewsPath)
    .use(require('express-uncapitalize')())<commit_msg>Split this long message into two<commit_after>var path = require('path');
var express = require('express');
var gzippo = require('gzippo');
var irc = require('irc');
var ms = require('ms');
var stringifyObject = require('stringify-object');

var logger = require('./core/logger').logger;

var root = path.dirname(__dirname);

var connectToIRC = function(config) {
  var bot = config.account;
  var client = new irc.Client(config.irc.address, bot.username, {
    userName: bot.username,
    realName: bot.username,
    port: 6667,
    password: <PASSWORD>,
    showErrors: true,
    channels: [bot.channel],
    stripColors: true
  });
  client.addListener('error', function(error) {
    var message = stringifyObject(error, {
      indent: '  ',
      singleQuotes: false
    });
    logger.error(message);
  });
  logger.info('Connected to IRC server ' + config.irc.address);
  logger.info('Joined channel #' + bot.channel + ' as ' + bot.username + '.');
};

var createApp = function(config) {
  var publicPath = path.join(root, 'public');
  var viewsPath = path.join(root, 'views');

  var gzipCacheAge = ms(config.server.cacheAge);

  var app = express();

  app
    .set('view engine', 'jade')
    .set('views', viewsPath)
    .use(require('express-uncapitalize')())
{'fraction_non_alphanumeric': 0.1608920748705695, 'fraction_numerical': 0.0031859816806053365, 'mean_word_length': 3.8494208494208495, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '1618696', 'n_tokens_mistral': 816, 'n_tokens_neox': 795, 'n_words': 189}