<commit_before>let mongoose = require('mongoose');
let shutdownMongoose;
let dbURI = 'mongodb://localhost/dronecafe';
if (process.env.NODE_ENV === 'production') {
    dbURI = process.env.MONGOLAB_URI;
}
//console.log('dbURI:::',dbURI );
mongoose.connect(dbURI);

// события соединения
mongoose.connection.on('connected', function() {
    console.log('Mongoose connected to ' + dbURI);
});
mongoose.connection.on('error', function(err) {
    console.log('Mongoose connection error: ' + err);
});
mongoose.connection.on('disconnected', function() {
    console.log('Mongoose disconnected');
});

// закрытие соединения с MongoDB<commit_msg>connection in db.js<commit_after>let mongoose = require('mongoose');
let shutdownMongoose;
let dbURI = 'mongodb://localhost/dronecafe';
if (process.env.NODE_ENV === 'production') {
    dbURI = process.env.MONGOLAB_URI;
}
//console.log('dbURI:::',dbURI );

mongoose.connect(dbURI);

// события соединения
mongoose.connection.on('connected', function() {
    console.log('Mongoose connected to ' + dbURI);
});
mongoose.connection.on('error', function(err) {
    console.log('Mongoose connection error: ' + err);
});
mongoose.connection.on('disconnected', function() {
    console.log('Mongoose disconnected');
});

// закрытие соединения с MongoDB
{'fraction_non_alphanumeric': 0.17225253312548713, 'fraction_numerical': 0.0, 'mean_word_length': 5.452261306532663, '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': '4757558', 'n_tokens_mistral': 430, 'n_tokens_neox': 443, 'n_words': 75}