<commit_before>
/**
 * Module dependencies.
 * Vishesh, Ashley, <NAME>
 */

var express = require('express');
var passport = require('passport'), GoogleStrategy = require('passport-google-oauth').OAuth2Strategy;
var partials = require('express-partials');
var http = require('http');
var path = require('path');
var handlebars = require('express3-handlebars')
var request = require('request');
var mongoose = require('mongoose');

//routes
var index = require('./routes/index');
var login = require('./routes/login');
var wishlist = require('./routes/wishlist');
var info = require('./routes/info');
var pasteats = require('./routes/pasteats');
var pasteats_editcreate = require('./routes/pasteats-editcreate');
var search = require('./routes/search');
var searchalt = require('./routes/search');
var help = require('./routes/help');
var fs = require('fs');

//This code lets us test on local, or use heroku properly.
var settings;
if(fs.existsSync('./settings.js')){
  settings = require('./settings.js');
}else{
  settings = {};
  settings.amazonID = process.env.S3Key;
  settings.amazonSecret = process.env.S3Secret;
  //CHANGE BACK WHEN WE SWITCH
  settings.callbackURL = "http://umamialt.herokuapp.com/auth/google/callback";
  settings.googleID = process.env.googleID;
  settings.googleSecret = process.env.googleSecret;
  settings.googleServer = process.env.googleServer;
}

//Mongo Database
var local_database_name = 'cs147-final';
var local_database_uri  = 'mongodb://localhost/' + local_database_name
var database_uri = process.env.MONGOLAB_URI || local_database_uri
mongoose.connect(database_uri);

var app = express();

// all environments
app.set('port', process.env.PORT || 3000);
app.set('views', path.join(__dirname, 'views'));
app.engine('handlebars', handlebars());
app.set('view engine', 'handlebars');
app.use(express.cookieParser());
app.use(express.session({secret: 'pink unicornians'}));
app.use(passport.initialize());
app.use(passport.session());
app.use(express.favicon());
app.use(express.logger('dev'));
app.use(express.json());
app.use(express.urlencoded());
app.use(express.multipart());
app.use(express.methodOverride());
app.use(express.session());<commit_msg>fixed for back to umami until we start tests<commit_after>
/**
 * Module dependencies.
 * <NAME>

 CHANGE THE CODE FOR WHEN WE GO BACK TO UMAMI
 */

var express = require('express');
var passport = require('passport'), GoogleStrategy = require('passport-google-oauth').OAuth2Strategy;
var partials = require('express-partials');
var http = require('http');
var path = require('path');
var handlebars = require('express3-handlebars')
var request = require('request');
var mongoose = require('mongoose');

//routes
var index = require('./routes/index');
var login = require('./routes/login');
var wishlist = require('./routes/wishlist');
var info = require('./routes/info');
var pasteats = require('./routes/pasteats');
var pasteats_editcreate = require('./routes/pasteats-editcreate');
var search = require('./routes/search');
var searchalt = require('./routes/search');
var help = require('./routes/help');
var fs = require('fs');

//This code lets us test on local, or use heroku properly.
var settings;
if(fs.existsSync('./settings.js')){
  settings = require('./settings.js');
}else{
  settings = {};
  settings.amazonID = process.env.S3Key;
  settings.amazonSecret = process.env.S3Secret;
  //CHANGE BACK WHEN WE SWITCH
  settings.callbackURL = "http://umami.herokuapp.com/auth/google/callback";
  settings.googleID = process.env.googleID;
  settings.googleSecret = process.env.googleSecret;
  settings.googleServer = process.env.googleServer;
}

//Mongo Database
var local_database_name = 'cs147-final';
var local_database_uri  = 'mongodb://localhost/' + local_database_name
var database_uri = process.env.MONGOLAB_URI || local_database_uri
mongoose.connect(database_uri);

var app = express();

// all environments
app.set('port', process.env.PORT || 3000);
app.set('views', path.join(__dirname, 'views'));
app.engine('handlebars', handlebars());
app.set('view engine', 'handlebars');
app.use(express.cookieParser());
app.use(express.session({secret: 'pink unicornians'}));
app.use(passport.initialize());
app.use(passport.session());
app.use(express.favicon());
app.use(express.logger('dev'));
app.use(express.json());
app.use(express.urlencoded());
app.use(express.multipart());
app.use(express.methodOverride());
app.use(express.session());
{'fraction_non_alphanumeric': 0.17567567567567569, 'fraction_numerical': 0.004954954954954955, 'mean_word_length': 5.698340874811463, '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': '541020', 'n_tokens_mistral': 1370, 'n_tokens_neox': 1361, 'n_words': 297}