<commit_before>'use strict';

/**
 *
 */

var express = require('express'),
routes = require('./routes'),
app = express(),
env = process.env.NODE_ENV || 'development',
database = require('./db'),
errorHandler = function (err, req, res, next) {
  if (env === 'development') {
    console.error(err.stack);
  }
  return res.json(500, { error: err.stack });
};

database.connect();

app.configure(function(){
  app.disable('x-powered-by');
  app.set('json spaces', 0);
  app.set('port', process.env.PORT || 8000);
  app.use(express.logger('dev'));
  app.use(express.compress());
  app.use(express.methodOverride());
  app.use(express.bodyParser());
  app.use(app.router);
  app.use(errorHandler);
});

require('./routes')(app);

function start() {
  app.listen(app.get('port'));
  console.log("Express server listening on port " + app.get('port'));
}

exports.start = start;
exports.app = app;<commit_msg>updating express settings<commit_after>'use strict';

/**
 *
 */

var express = require('express'),
routes = require('./routes'),
app = express(),
env = process.env.NODE_ENV || 'development',
database = require('./db'),
errorHandler = function (err, req, res, next) {
  if (env === 'development') {
    console.error(err.stack);
  }
  return res.json(500, { error: err.stack });
};

database.connect();

app.configure(function(){
  app.disable('x-powered-by');
  app.set('port', process.env.PORT || 8000);
  app.use(express.logger('dev'));
  app.use(express.compress());
  app.use(express.methodOverride());
  app.use(express.bodyParser());
  app.use(express.favicon());
  app.use(app.router);
  app.use(errorHandler);
});

require('./routes')(app);

function start() {
  app.listen(app.get('port'));
  console.log("Express server listening on port " + app.get('port'));
}

exports.start = start;
exports.app = app;
{'fraction_non_alphanumeric': 0.21463951568519538, 'fraction_numerical': 0.00825536598789213, 'mean_word_length': 4.576687116564417, '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': '4383000', 'n_tokens_mistral': 616, 'n_tokens_neox': 602, 'n_words': 113}