<commit_before>//var local = require('../config/local');
var migrates = require('../migration/migrates');

var db = require('../server/services/db');
//var mongoClient = require('mongodb').MongoClient;

db.init(function (dbErr) {
  if (dbErr) {
    return console.error('Failed to connect to MongoDB.');
  }

  migrates.migrate(function (err) {
    if (err) {
      console.error(err);
    }

    db.close();
  });
});

// mongoClient.connect(local.mongo.url, function (dbErr, db) {
//   if (dbErr) {
//     return console.error('Failed to connect to MongoDB.');
//   }
//
//   migrates.migrate({
//     db: db,
//     callback: function (err) {
//       if (err) {
//         console.error(err);
//       }
//
//       db.close();
//     },
//   });
//
// });<commit_msg>Remove commented code<commit_after>var migrates = require('../migration/migrates');

var db = require('../server/services/db');

db.init(function (dbErr) {
  if (dbErr) {
    return console.error('Failed to connect to MongoDB.');
  }

  migrates.migrate(function (err) {
    if (err) {
      console.error(err);
    }

    db.close();
  });
});
{'fraction_non_alphanumeric': 0.2060931899641577, 'fraction_numerical': 0.0, 'mean_word_length': 2.479750778816199, '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': '6222613', 'n_tokens_mistral': 390, 'n_tokens_neox': 392, 'n_words': 74}