<commit_before>
/**
 * Module dependencies.
 */

var http = require('http');
var path = require('path');
var express = require('express');
var passport = require('passport');
var AWS = require('aws-sdk');
var mongoose = require('mongoose');
var LocalStrategy = require('passport-local').Strategy;
var bodyParser = require('body-parser');
var User = require('./models/user');
var session = require('express-session');

var creds = require('./routes/creds');

var index = require('./routes/index');
var git_pull = require('./routes/gitPull');
var project = require('./routes/project');
var file = require('./routes/file');
var login = require('./routes/login');
var signup = require('./routes/signup');
var dashboard = require('./routes/dashboard');
var git = require('./routes/git');

var app = express();
var s3 = new AWS.S3();

mongoose.connect('letsg.it:8001', 'LetsGit');
var db = mongoose.connection;
db.on('error', console.error.bind(console, 'connection error:'));
db.once('open', function callback() {
  console.log('Connected to DB');
});

passport.serializeUser(function(user, done) {<commit_msg>Trying to get centralized mongo connection<commit_after>
/**
 * Module dependencies.
 */

var http = require('http');
var path = require('path');
var express = require('express');
var passport = require('passport');
var AWS = require('aws-sdk');
var mongoose = require('mongoose');
var LocalStrategy = require('passport-local').Strategy;
var bodyParser = require('body-parser');
var User = require('./models/user');
var session = require('express-session');

var creds = require('./routes/creds');

var index = require('./routes/index');
var git_pull = require('./routes/gitPull');
var project = require('./routes/project');
var file = require('./routes/file');
var login = require('./routes/login');
var signup = require('./routes/signup');
var dashboard = require('./routes/dashboard');
var git = require('./routes/git');

var app = express();
var s3 = new AWS.S3();

mongoose.connect('mongodb://letsg.it:8001', 'LetsGit');
var db = mongoose.connection;
db.on('error', console.error.bind(console, 'connection error:'));
db.once('open', function callback() {
  console.log('Connected to DB');
});

passport.serializeUser(function(user, done) {
{'fraction_non_alphanumeric': 0.19697643397065362, 'fraction_numerical': 0.005335704757670075, 'mean_word_length': 5.502890173410405, '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': '990075', 'n_tokens_mistral': 667, 'n_tokens_neox': 680, 'n_words': 173}