<commit_before>//
// Module dependencies
//
var fs = require('fs'),
    path = require('path'),
    connect = require('connect'),
    express = require('express'),
    engines = require('consolidate'),
    i18n = require('i18next'),
    urljoin = require('./lib/urljoin'),
    _ = require('lodash'),
    logger = require('./lib/logger'),
    settings = require('./config/settings');

// Auto-load bundled middleware
var middleware = {};

fs.readdirSync(__dirname + '/lib/middleware').forEach(function(filename) {
    if ( ! /\.js$/.test(filename)) {
        return;
    }
    var name = path.basename(filename, '.js');
    middleware[name] = require('./lib/middleware/' + name);
});

module.exports = function(options) {
    options = options || {};

    // Change route settings in multihost environment
    settings.route = options.route || settings.route;

    // Main app
    var app = express();
    var errorhandler = require('errorhandler');
    var favicon = require('serve-favicon');
    var cookieParser = require('cookie-parser');
    var bodyParser = require('body-parser');
    //var busboy = require('connect-busboy');
    var multiparty = require('connect-multiparty');
    var methodOverride = require('method-override');
    var morgan = require('morgan');<commit_msg>No options available<commit_after>//
// Module dependencies
//
var fs = require('fs'),
    path = require('path'),
    connect = require('connect'),
    express = require('express'),
    engines = require('consolidate'),
    i18n = require('i18next'),
    urljoin = require('./lib/urljoin'),
    _ = require('lodash'),
    logger = require('./lib/logger'),
    settings = require('./config/settings');

// Auto-load bundled middleware
var middleware = {};

fs.readdirSync(__dirname + '/lib/middleware').forEach(function(filename) {
    if ( ! /\.js$/.test(filename)) {
        return;
    }
    var name = path.basename(filename, '.js');
    middleware[name] = require('./lib/middleware/' + name);
});

module.exports = function() {
    // Main app
    var app = express();
    var errorhandler = require('errorhandler');
    var favicon = require('serve-favicon');
    var cookieParser = require('cookie-parser');
    var bodyParser = require('body-parser');
    //var busboy = require('connect-busboy');
    var multiparty = require('connect-multiparty');
    var methodOverride = require('method-override');
    var morgan = require('morgan');
{'fraction_non_alphanumeric': 0.1740024681201152, 'fraction_numerical': 0.003290826820238585, 'mean_word_length': 3.429872495446266, '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': '2745856', 'n_tokens_mistral': 702, 'n_tokens_neox': 687, 'n_words': 154}