<commit_before>var express = require('express');
var path = require('path');
var favicon = require('serve-favicon');
var logger = require('morgan');
var cookieParser = require('cookie-parser');
var bodyParser = require('body-parser');
var twig = require('twig');
var mongoose = require('mongoose');
var https = require('https');
var http = require('http');
var fs = require('fs');

//var privateKey = fs.readFileSync( 'privatekey.pem' );
//var certificate = fs.readFileSync( 'certificate.pem' );

mongoose.connect('mongodb://localhost:27017/HackArdennes');
var db = mongoose.connection;
db.once('open', function() {
	console.log('OPEN');
});



var index = require('./routes/index');
var api = require('./routes/api');

var app = express();

// view engine setup
app.set('views', path.join(__dirname, 'views'));

app.set("twig options", {
    strict_variables: false
});

// uncomment after placing your favicon in /public
//app.use(favicon(path.join(__dirname, 'public', 'favicon.ico')));
app.use(logger('dev'));
app.use(bodyParser.json());
app.use(bodyParser.urlencoded({ extended: false }));
app.use(cookieParser());
app.use(express.static(path.join(__dirname, 'public')));

app.use('/', index);
app.use('/api', api);

// catch 404 and forward to error handler
app.use(function(req, res, next) {
  var err = new Error('Not Found');
  err.status = 404;
  next(err);
});

// error handler
app.use(function(err, req, res, next) {
  // set locals, only providing error in development
  res.locals.message = err.message;
  res.locals.error = req.app.get('env') === 'development' ? err : {};
<commit_msg>jba // push app.js<commit_after>var express = require('express');
var path = require('path');
var favicon = require('serve-favicon');
var logger = require('morgan');
var cookieParser = require('cookie-parser');
var bodyParser = require('body-parser');
var twig = require('twig');
var mongoose = require('mongoose');
var https = require('https');
var http = require('http');
var fs = require('fs');

//var privateKey = fs.readFileSync( 'privatekey.pem' );
//var certificate = fs.readFileSync( 'certificate.pem' );

mongoose.connect('mongodb://localhost:27017/HackArdennes');
var db = mongoose.connection;
db.once('open', function() {
	console.log('OPEN');
});



var index = require('./routes/index');
var api = require('./routes/api');
var volunteer = require('./routes/volunteer');

var app = express();

// view engine setup
app.set('views', path.join(__dirname, 'views'));

app.set("twig options", {
    strict_variables: false
});

// uncomment after placing your favicon in /public
//app.use(favicon(path.join(__dirname, 'public', 'favicon.ico')));
app.use(logger('dev'));
app.use(bodyParser.json());
app.use(bodyParser.urlencoded({ extended: false }));
app.use(cookieParser());
app.use(express.static(path.join(__dirname, 'public')));

app.use('/', index);
app.use('/api', api);
app.use('/volunteer', volunteer);

// catch 404 and forward to error handler
app.use(function(req, res, next) {
  var err = new Error('Not Found');
  err.status = 404;
  next(err);
});

// error handler
app.use(function(err, req, res, next) {
  // set locals, only providing error in development
  res.locals.message = err.message;
  res.locals.error = req.app.get('env') === 'development' ? err : {};

{'fraction_non_alphanumeric': 0.19586374695863748, 'fraction_numerical': 0.006690997566909975, 'mean_word_length': 5.090740740740741, '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': '3235438', 'n_tokens_mistral': 1080, 'n_tokens_neox': 1062, 'n_words': 259}