<commit_before>mongoose = require 'mongoose'
logger = require './logger'
autoIncrement = require 'mongoose-auto-increment'


mongoose.connect 'mongodb://localhost/themis'
autoIncrement.initialize mongoose.connection

mongoose.connection
    .on 'error', ->
        logger.info 'Connection error'
    .once 'open', (callback) ->
        logger.info 'Connected to MongoDB server'

module.exports = mongoose<commit_msg>Pass mongodb connection string via environment variable<commit_after>mongoose = require 'mongoose'
logger = require './logger'
autoIncrement = require 'mongoose-auto-increment'


mongoose.connect process.env.MONGODB_URI
autoIncrement.initialize mongoose.connection

mongoose.connection
    .on 'error', ->
        logger.info 'Connection error'
    .once 'open', (callback) ->
        logger.info 'Connected to MongoDB server'

module.exports = mongoose
{'fraction_non_alphanumeric': 0.10586881472957423, 'fraction_numerical': 0.0, 'mean_word_length': 4.240963855421687, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, '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': '4860298', 'n_tokens_mistral': 252, 'n_tokens_neox': 258, 'n_words': 63}