<commit_before>var express = require('express'),
	partials = require('express-partials'),
	app = express(),
	routes = require('./routes'),
	cookieParser = require('cookie-parser'),
	bodyParser = require('body-parser'),
	//csrf = require('csurf'),
	session = require('express-session'),
	flash = require('connect-flash'),
	config = require('./config'),
	io = require('./socket.io'),
	mongoose = require('mongoose'),
	passport = require('passport'),
	cookieSession = require('cookie-session'),
	LocalStrategy = require('passport-local').Strategy;


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

app.use(bodyParser.json());
app.use(bodyParser.urlencoded({extended: false}));
app.use(cookieParser(config.secret));


//new stuff
var Account = require('./models/account');
passport.use(Account.createStrategy());

passport.serializeUser(Account.serializeUser());
passport.deserializeUser(Account.deserializeUser());

mongoose.connect('mongodb://heroku_q46gwrlr:<EMAIL>:19058/heroku_q46gwrlr', function(err) {
  if (err) {
    console.log('Could not connect to mongodb on localhost. Ensure that you have mongodb running on localhost and mongodb accepts connections on standard ports!');
  } else {
		console.log('Mon is go');
	}
});

//routes
app.get('/', routes.index);
app.put('/user/update/score/:username/:result', routes.user);
app.post(config.routes.login, passport.authenticate('local'), routes.login);
app.get(config.routes.logout, routes.logOut);
app.post(config.routes.register, routes.register);

app.get('/error', function(req, res, next){
	next(new Error('A contrived error'));
});

var server = app.listen(process.env.PORT)
// var server = app.listen(2525);
io.startIo(server);<commit_msg>Fixed minor bugs<commit_after>var express = require('express'),
	partials = require('express-partials'),
	app = express(),
	routes = require('./routes'),
	cookieParser = require('cookie-parser'),
	bodyParser = require('body-parser'),
	//csrf = require('csurf'),
	session = require('express-session'),
	flash = require('connect-flash'),
	config = require('./config'),
	io = require('./socket.io'),
	mongoose = require('mongoose'),
	passport = require('passport'),
	cookieSession = require('cookie-session'),
	LocalStrategy = require('passport-local').Strategy;


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

app.use(bodyParser.json());
app.use(bodyParser.urlencoded({extended: false}));
app.use(cookieParser(config.secret));


//new stuff
var Account = require('./models/account');
passport.use(Account.createStrategy());

passport.serializeUser(Account.serializeUser());
passport.deserializeUser(Account.deserializeUser());

mongoose.connect('mongodb://heroku_q46gwrlr:<EMAIL>:19058/heroku_q46gwrlr', function(err) {
  if (err) {
    console.log('Could not connect to mongodb on localhost. Ensure that you have mongodb running on localhost and mongodb accepts connections on standard ports!');
  } else {
		console.log('Mon is go');
	}
});

//routes
app.get('/', routes.index);
app.put('/user/update/score/:username/:result', routes.score);
app.post(config.routes.login, passport.authenticate('local'), routes.login);
app.get(config.routes.logout, routes.logOut);
app.post(config.routes.register, routes.register);

app.get('/error', function(req, res, next){
	next(new Error('A contrived error'));
});

var server = app.listen(process.env.PORT)
// var server = app.listen(2525);
io.startIo(server);
{'fraction_non_alphanumeric': 0.18144690781796965, 'fraction_numerical': 0.007584597432905484, 'mean_word_length': 6.041067761806982, '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': '1897882', 'n_tokens_mistral': 1089, 'n_tokens_neox': 1078, 'n_words': 205}