<commit_before>'use strict'
const mongoose = require('mongoose')
const api = require('./api')
const trends = require('./twitter/trends')
const config = require('./config')
const dbUtils = require('./utils/db-utils')
const TweetStream = require('./twitter/tweet-stream')
const tweetSearch = require('./twitter/tweet-search')
const news = require('./news/news')

mongoose.Promise = global.Promise

var db = mongoose.connection
db.on('error', console.error)
db.once('open', () => {
  console.log('Successfully connected to mongodb')

  // Run updateTrends when the backend starts
  updateTrends()

  // Then set up updateTrends to run each server interval
  setInterval(updateTrends, config.intervalLength * 1000)<commit_msg>Output Mongo server address at startup<commit_after>'use strict'
const mongoose = require('mongoose')
const api = require('./api')
const trends = require('./twitter/trends')
const config = require('./config')
const dbUtils = require('./utils/db-utils')
const TweetStream = require('./twitter/tweet-stream')
const tweetSearch = require('./twitter/tweet-search')
const news = require('./news/news')

mongoose.Promise = global.Promise

var db = mongoose.connection
db.on('error', console.error)
db.once('open', () => {
  console.log('Successfully connected to MongoDB server ' + config.dbAddress)

  // Run updateTrends when the backend starts
  updateTrends()

  // Then set up updateTrends to run each server interval
  setInterval(updateTrends, config.intervalLength * 1000)
{'fraction_non_alphanumeric': 0.14171122994652408, 'fraction_numerical': 0.0053475935828877, 'mean_word_length': 4.964143426294821, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '2164596', 'n_tokens_mistral': 440, 'n_tokens_neox': 419, 'n_words': 120}