<commit_before>var express = require('express');
var config = require('./config');
var app = express();
var db = require('./db.js').connect();
var passport = require('passport');
var session = require('express-session');
var bodyParser = require('body-parser');
var cookieParser = require('cookie-parser');
var flash = require('connect-flash');
var log = require('winston').loggers.get('app:server');

// config ================================================
app.use(function (req, res, next) {
  res.locals.req = req;
  next();
});
app.use(cookieParser());
app.use(session({
  secret: 'they were like northern stars',
  resave: true,
  saveUninitialized: true
}));
app.use(bodyParser.urlencoded({ extended: true }));

require('./controllers/csrf')(app);

// passport
require('./controllers/passport')(passport);
app.use(passport.initialize());
app.use(passport.session());
app.use(flash());

// views
app.set('views', __dirname + '/views');
app.set('view engine', 'jade');

// static files
app.use('/assets', express.static(__dirname + '/assets'));

// routes ================================================
require('./controllers/route')(app);

var routes = {
  configuration: ['/configuration', require('./routes/configuration')],
  //settings: ['/settings', require('./routes/settings')]
};
for (var key in routes) {
  app.use(routes[key][0], routes[key][1]);
}

[
  './routes/main',
  './routes/user',
  './routes/settings',
  './routes/clients'
].forEach(function(routePath) {
  require(routePath)(app, passport);
});
<commit_msg>i'm concerned about the potential size of this object<commit_after>var express = require('express');
var config = require('./config');
var app = express();
var db = require('./db.js').connect();
var passport = require('passport');
var session = require('express-session');
var bodyParser = require('body-parser');
var cookieParser = require('cookie-parser');
var flash = require('connect-flash');
var log = require('winston').loggers.get('app:server');

// config ================================================
app.use(function (req, res, next) {
  res.locals.req = req;
  next();
});
app.use(cookieParser());
app.use(session({
  secret: 'they were like northern stars',
  resave: true,
  saveUninitialized: true
}));
app.use(bodyParser.urlencoded({ extended: true }));

require('./controllers/csrf')(app);

// passport
require('./controllers/passport')(passport);
app.use(passport.initialize());
app.use(passport.session());
app.use(flash());

// views
app.set('views', __dirname + '/views');
app.set('view engine', 'jade');

// static files
app.use('/assets', express.static(__dirname + '/assets'));

// routes ================================================
require('./controllers/route')(app);

var routes = {
  configuration: ['/configuration', './routes/configuration'],
  //settings: ['/settings', require('./routes/settings')]
};
for (var key in routes) {
  app.use(routes[key][0], require(routes[key][1]));
}

[
  './routes/main',
  './routes/user',
  './routes/settings',
  './routes/clients'
].forEach(function(routePath) {
  require(routePath)(app, passport);
});

{'fraction_non_alphanumeric': 0.26330981398332265, 'fraction_numerical': 0.0012828736369467607, 'mean_word_length': 5.511482254697286, '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': '2913178', 'n_tokens_mistral': 937, 'n_tokens_neox': 942, 'n_words': 198}