<commit_before>// server.js

var Express = require('express');
var Mongoose = require('mongoose');
var Passport = require('passport');
var Flash = require('connect-flash');
var Morgan = require('morgan');
var CookieParser = require('cookie-parser');
var BodyParser = require('body-parser');
var Session = require('express-session');

var configDb = require('./config/database.js');

// configuration
Mongoose.connect(configDb.url);

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

// set up Express
var app = Express();
app.use(Morgan('dev'));
var port = Number(process.env.PORT || 3000);
app.use(CookieParser());
app.use(BodyParser());

app.set('view engine', 'ejs');

// required for Passport
app.use(Session({
	secret: 'TheLannistersSendTheirRegards'
}));
app.use(Passport.initialize());
app.use(Passport.session());
app.use(Flash());

// site routes<commit_msg>configure server support environment variables<commit_after>// server.js

var Express = require('express');
var Mongoose = require('mongoose');
var Passport = require('passport');
var Flash = require('connect-flash');
var Morgan = require('morgan');
var CookieParser = require('cookie-parser');
var BodyParser = require('body-parser');
var Session = require('express-session');

var Vars = require('./config/vars.js');

// configuration
Mongoose.connect(Vars.database);

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

// set up Express
var app = Express();
app.use(Morgan('dev'));
var port = Number(process.env.PORT || 3000);
app.use(CookieParser());
app.use(BodyParser());

app.set('view engine', 'ejs');

// required for Passport
app.use(Session({
	secret: Vars.session
}));
app.use(Passport.initialize());
app.use(Passport.session());
app.use(Flash());

// site routes
{'fraction_non_alphanumeric': 0.1886244921648288, 'fraction_numerical': 0.0046430644225188625, 'mean_word_length': 6.008130081300813, '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': '587700', 'n_tokens_mistral': 538, 'n_tokens_neox': 526, 'n_words': 121}