<commit_before>
/**
 * Module dependencies
 */

var serverUrl = "http://hackathon-kahkhang.c9.io";

var fs = require('fs');
var express = require('express');
var mongoose = require('mongoose');

var app = express();
var server = require('http').Server(app);
var port = process.env.PORT || 3000;

// Connect to mongodb
var connect = function () {
  var options = { server: { socketOptions: { keepAlive: 1 } } };
  mongoose.connect("mongodb://localhost/hyde", options);
};
connect();

mongoose.connection.on('error', console.log);
mongoose.connection.on('disconnected', connect);

// Bootstrap models
fs.readdirSync(__dirname + '/app/models').forEach(function (file) {
  if (~file.indexOf('.js')) require(__dirname + '/app/models/' + file);
});

// Bootstrap application settings
require('./config/express')(app);

server.listen(port);
console.log('Express app started on port ' + port);

// Twitter Feed
require('./config/twitterFeed')(server, app, serverUrl);

// Bootstrap routes
require('./config/routes')(app);
<commit_msg>support for openshift<commit_after>
/**
 * Module dependencies
 */

var serverUrl = "http://hackathon-kahkhang.c9.io";

var fs = require('fs');
var express = require('express');
var mongoose = require('mongoose');

var app = express();
var server = require('http').Server(app);
var port = process.env.OPENSHIFT_NODEJS_PORT || process.env.PORT || 3000;

// Connect to mongodb
var connect = function () {
  var options = { server: { socketOptions: { keepAlive: 1 } } };
  mongoose.connect("mongodb://localhost/hyde", options);
};
connect();

mongoose.connection.on('error', console.log);
mongoose.connection.on('disconnected', connect);

// Bootstrap models
fs.readdirSync(__dirname + '/app/models').forEach(function (file) {
  if (~file.indexOf('.js')) require(__dirname + '/app/models/' + file);
});

// Bootstrap application settings
require('./config/express')(app);

server.listen(port);
console.log('Express app started on port ' + port);

// Twitter Feed
require('./config/twitterFeed')(server, app, serverUrl);

// Bootstrap routes
require('./config/routes')(app);

{'fraction_non_alphanumeric': 0.18502622794468288, 'fraction_numerical': 0.005722460658082976, 'mean_word_length': 4.909859154929578, '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': '5118223', 'n_tokens_mistral': 655, 'n_tokens_neox': 643, 'n_words': 149}