<commit_before>var bodyParser = require('body-parser'),
	cookieParser = require('cookie-parser'),
	config = require('./config/config'),
	express = require('express'),
    expressLayouts = require('express-ejs-layouts'),
	expressSession = require('express-session'),
	mongoose = require('mongoose'),
	passport = require('passport'),
    routes = require('./routes');

var app = express();

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

app.use(expressLayouts);
app.use(bodyParser.urlencoded({extended: true}));
app.use(bodyParser.json());
app.use(cookieParser(secret='I like turtles'));
app.use(expressSession({secret: 'keyboard cat',
						resave: false,
						saveUninitialized: false}));
app.use(passport.initialize());
app.use(passport.session());
app.use('/', routes);
app.use(express.static(__dirname + '/static'));
app.use('/media', express.static(__dirname + '/media'));


var db_connection = mongoose.createConnection(config.db);
db_connection.on('error', function () {
    console.log('Error! Database connection failed.');
});

app.listen(config.port);<commit_msg>Separate model logic<commit_after>var bodyParser = require('body-parser'),
	cookieParser = require('cookie-parser'),
	config = require('./config/config'),
	express = require('express'),
    expressLayouts = require('express-ejs-layouts'),
	expressSession = require('express-session'),
	passport = require('passport'),
    routes = require('./routes');

var app = express();

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

app.use(expressLayouts);
app.use(bodyParser.urlencoded({extended: true}));
app.use(bodyParser.json());
app.use(cookieParser(secret='I like turtles'));
app.use(expressSession({secret: 'keyboard cat',
						resave: false,

						saveUninitialized: false}));

app.use(passport.initialize());
app.use(passport.session());

app.use('/', routes);
app.use(express.static(__dirname + '/static'));
app.use('/media', express.static(__dirname + '/media'));

app.listen(config.port);
{'fraction_non_alphanumeric': 0.19672943508424182, 'fraction_numerical': 0.0, 'mean_word_length': 6.109154929577465, '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': '2150919', 'n_tokens_mistral': 636, 'n_tokens_neox': 619, 'n_words': 112}