<commit_before>var express = require('express'),
    bodyParser = require('body-parser'),
    app = express(),
    ejs = require('ejs'),
    mongoose = require('mongoose'),
    path = require('path');

// Handler for DB Connection Errors
mongoose.connection.on('error', function(err) {
  console.error("MongoDB error", err);
});

// Connect to the Mongo DB
mongoose.connect( process.env.MONGODB ? process.env.MONGODB : 'mongodb://localhost/project-echo');

// Configure Express to handle JSON requests<commit_msg>Now automatically detects config for mLab DB's<commit_after>var express = require('express'),
    bodyParser = require('body-parser'),
    app = express(),
    ejs = require('ejs'),
    mongoose = require('mongoose'),
    path = require('path');

// Handler for DB Connection Errors
mongoose.connection.on('error', function(err) {
  console.error("MongoDB error", err);
});

// Connect to the Mongo DB
mongoose.connect( process.env.MONGODB || process.env.MONGOLAB_URI || 'mongodb://localhost/structured-data' );

// Configure Express to handle JSON requests
{'fraction_non_alphanumeric': 0.15233644859813084, 'fraction_numerical': 0.0, 'mean_word_length': 4.464285714285714, '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': '6999844', 'n_tokens_mistral': 324, 'n_tokens_neox': 321, 'n_words': 81}