<commit_before>'use strict';
// mongo ds149998.mlab.com:49998/vote-machine -u <dbuser> -p <dbpassword>
//  mongodb://<dbuser>:<dbpassword>@ds<EMAIL>:49998/vote-machine

var express = require('express');
var routes = require('./app/routes/index.js');
var mongoose = require('mongoose');
var passport = require('passport');
var session = require('express-session');
var sessionMongo = require('express-session');
var MongoDBStore = require('connect-mongodb-session')(sessionMongo);
var Primus = require('primus');

var app = express();
var server = require('http').createServer(app);
var primus = new Primus(server);

if (process.env.NODE_ENV === 'development') {
	require('dotenv').load();
}

require('./app/config/passport')(passport);

/**
 * Create a new MongoDBStore
 */
var store = new MongoDBStore(
	{
		uri: process.env.MONGO_URI,
		collection: 'mySessions'
	});

/**
 * Catch errors
 */
store.on('error', function (error) {
	assert.ifError(error);
	assert.ok(false);
});

mongoose.connect(process.env.MONGO_URI);
mongoose.Promise = global.Promise;

app.use('/controllers', express.static(process.cwd() + '/app/client/controllers'));
app.use('/public', express.static(process.cwd() + '/public'));
app.use('/common', express.static(process.cwd() + '/app/client/common'));
app.use('/views', express.static(process.cwd() + '/app/client/views'));

/**
 * Save the Primus client library
 */
primus.save('./public/js/primus.js');

app.use(session({
	secret: 'secretSauce',
	resave: true,
	saveUninitialized: true,
	cookie: {
		maxAge: 1000 * 60 * 60 * 24 * 7
	},
	store: store,
}));

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

routes(app, passport, primus);<commit_msg>comment out passport and session items<commit_after>'use strict';
// mongo ds149998.mlab.com:49998/vote-machine -u <dbuser> -p <dbpassword>
//  mongodb://<dbuser>:<dbpassword>@ds149998.mlab.com:49998/vote-machine

var express = require('express');
var routes = require('./app/routes/index.js');
var mongoose = require('mongoose');
// var passport = require('passport');
var session = require('express-session');
var sessionMongo = require('express-session');
var MongoDBStore = require('connect-mongodb-session')(sessionMongo);
var Primus = require('primus');

var app = express();
var server = require('http').createServer(app);
var primus = new Primus(server);

if (process.env.NODE_ENV === 'development') {
	require('dotenv').load();
}

// require('./app/config/passport')(passport);

/**
 * Create a new MongoDBStore
 */
var store = new MongoDBStore(
	{
		uri: process.env.MONGO_URI,
		collection: 'mySessions'
	});

/**
 * Catch errors
 */
store.on('error', function (error) {
	assert.ifError(error);
	assert.ok(false);
});

mongoose.connect(process.env.MONGO_URI);
mongoose.Promise = global.Promise;

app.use('/controllers', express.static(process.cwd() + '/app/client/controllers'));
app.use('/public', express.static(process.cwd() + '/public'));
app.use('/common', express.static(process.cwd() + '/app/client/common'));
app.use('/views', express.static(process.cwd() + '/app/client/views'));

/**
 * Save the Primus client library
 */
primus.save('./public/js/primus.js');

// app.use(session({
// 	secret: 'secretSauce',
// 	resave: true,
// 	saveUninitialized: true,
// 	cookie: {
// 		maxAge: 1000 * 60 * 60 * 24 * 7
// 	},
// 	store: store,
// }));

// app.use(passport.initialize());
// app.use(passport.session());
var passport = 'test';
routes(app, passport, primus);
{'fraction_non_alphanumeric': 0.20230547550432276, 'fraction_numerical': 0.01729106628242075, 'mean_word_length': 4.8830508474576275, 'pattern_counts': {'":': 0, '<': 12, '<?xml version=': 0, '>': 12, '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': '7403780', 'n_tokens_mistral': 1251, 'n_tokens_neox': 1194, 'n_words': 225}