<commit_before>var mongoose = require('mongoose')
//mongoose.set('debug', true);

var connectionString = 'mongodb://localhost/nice';
//var connectionString = 'mongodb://localhost/machine'; //as the production db

// OPENSHIFT RED HAT connection string
if (process.env.OPENSHIFT_MONGODB_DB_PASSWORD) {
  connectionString = process.env.OPENSHIFT_MONGODB_DB_USERNAME + ":" +
    process.env.OPENSHIFT_MONGODB_DB_PASSWORD + "@" +
    process.env.OPENSHIFT_MONGODB_DB_HOST + ':' +
    process.env.OPENSHIFT_MONGODB_DB_PORT + '/' +
    process.env.OPENSHIFT_APP_NAME;
}

// HEROKU string
if (process.env.MONGODB_URI) {
    connectionString = process.env.MONGODB_URI;
}

// AWS connection string

// TEST 2020
/*if (process.env.BITNAMI_ROOT && (process.env.SSH_CONNECTION).indexOf('172.31.95.65')!=-1) {
  connectionString = 'mongodb://paolo.spadoni:kersey8D1@ec2-54-166-41-171.compute-1.amazonaws.com:27017/machine';
}*/

// PROD
//if (process.env.BITNAMI_ROOT && (process.env.SSH_CONNECTION).indexOf('172.31.37.50')!=-1) {
  connectionString = 'mongodb://paolo.spadoni:kersey8D1@ec2-34-230-189-92.compute-1.amazonaws.com:27017/machine';
//}


mongoose.connect(connectionString, function () {
  console.log('mongodb connected with string = ' + connectionString);
})
module.exports = mongoose<commit_msg>restore db settings<commit_after>var mongoose = require('mongoose')
//mongoose.set('debug', true);

var connectionString = 'mongodb://localhost/nice';
//var connectionString = 'mongodb://localhost/machine'; //as the production db

// OPENSHIFT RED HAT connection string
if (process.env.OPENSHIFT_MONGODB_DB_PASSWORD) {
  connectionString = process.env.OPENSHIFT_MONGODB_DB_USERNAME + ":" +
    process.env.OPENSHIFT_MONGODB_DB_PASSWORD + "@" +
    process.env.OPENSHIFT_MONGODB_DB_HOST + ':' +
    process.env.OPENSHIFT_MONGODB_DB_PORT + '/' +
    process.env.OPENSHIFT_APP_NAME;
}

// HEROKU string
if (process.env.MONGODB_URI) {
    connectionString = process.env.MONGODB_URI;
}

// AWS connection string

// TEST 2020
if (process.env.BITNAMI_ROOT && (process.env.SSH_CONNECTION).indexOf('172.31.95.65')!=-1) {
  connectionString = 'mongodb://paolo.spadoni:kersey8D1@ec2-54-166-41-171.compute-1.amazonaws.com:27017/machine';
}

// PROD
if (process.env.BITNAMI_ROOT && (process.env.SSH_CONNECTION).indexOf('172.31.37.50')!=-1) {
  connectionString = 'mongodb://paolo.spadoni:kersey8D1@ec2-34-230-189-92.compute-1.amazonaws.com:27017/machine';
}


mongoose.connect(connectionString, function () {
  console.log('mongodb connected with string = ' + connectionString);
})
module.exports = mongoose
{'fraction_non_alphanumeric': 0.1566358024691358, 'fraction_numerical': 0.047839506172839504, 'mean_word_length': 4.775055679287306, 'pattern_counts': {'":': 2, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 8, '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': '3963465', 'n_tokens_mistral': 1023, 'n_tokens_neox': 950, 'n_words': 119}