<commit_before>var mongodbClient = require('mongodb');

var mongoUri =  process.env.MONGOLAB_URI ||
                process.env.MONGOHQ_URL ||
                'mongodb://127.0.0.1:27017/Communique';
// var url = 'mongodb://127.0.0.1:27017/Communique';

var app = exports = module.exports = {};

app.init = function () {
    mongodbClient.connect(mongoUri, function (err, db) {
        // db.dropDatabase(function (err, result) {
            db.dropCollection('item', function (err, result) {
                db.createCollection('item', function (err, collection){
                    if (err) {
                        console.log('Create Error');
                    } else {
                        console.log('Create Successed');
                    }
                    db.close();
                });
            });
        // });
    });
};

app.insertData = function (data) {<commit_msg>remove collection data on heroku<commit_after>var mongodbClient = require('mongodb');

var mongoUri =  process.env.MONGOLAB_URI ||
                process.env.MONGOHQ_URL ||
                'mongodb://127.0.0.1:27017/Communique';
// var url = 'mongodb://127.0.0.1:27017/Communique';

var app = exports = module.exports = {};

app.init = function () {
    mongodbClient.connect(mongoUri, function (err, db) {
        // db.dropDatabase(function (err, result) {
            // db.dropCollection('item', function (err, result) {
            //     db.createCollection('item', function (err, collection){
            //         if (err) {
            //             console.log('Create Error');
            //         } else {
            //             console.log('Create Successed');
            //         }
            //         db.close();
            //     });
            // });
        // });
        db.collection('item', function (err, collection) {
            collection.remove();
            db.close();
        });
    });
};

app.insertData = function (data) {
{'fraction_non_alphanumeric': 0.15322171486555047, 'fraction_numerical': 0.022323693556570268, 'mean_word_length': 1.5217391304347827, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 4, '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': '1390628', 'n_tokens_mistral': 590, 'n_tokens_neox': 545, 'n_words': 96}