<commit_before>//
//  core
//

const bus = require('./bus.js');

// global for debugging
const jabber = global.jabber = require('./bots/jabber');
const telegram = global.telegram = require('./bots/telegram');

bus.on('message', ({network, room, name, message}) => {
  console.log(`${network} "${room}": <${name}> ${message}`);

  if (network === 'JABBER') {
    telegram.send({name, message});
  }

  if (network === 'TELEGRAM') {
    jabber.send({name, message});
  }
});<commit_msg>add webserver for heroku live avoid )<commit_after>//
//  core
//

const bus = require('./bus.js');

// global for debugging
const jabber = global.jabber = require('./bots/jabber');
const telegram = global.telegram = require('./bots/telegram');

bus.on('message', ({network, room, name, message}) => {
  console.log(`${network} "${room}": <${name}> ${message}`);

  if (network === 'JABBER') {
    telegram.send({name, message});
  }

  if (network === 'TELEGRAM') {
    jabber.send({name, message});
  }
});

// ////////////////////////////////
// FOR HEROKU "HEARTBEAT" POLING //
// ////////////////////////////////
const handleRequest = (request, response) => {
  response.end('Works');
};
require('http').createServer(handleRequest).listen(5000);
{'fraction_non_alphanumeric': 0.26823338735818475, 'fraction_numerical': 0.0032414910858995136, 'mean_word_length': 3.1029900332225915, 'pattern_counts': {'":': 2, '<': 5, '<?xml version=': 0, '>': 8, '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': '2411833', 'n_tokens_mistral': 414, 'n_tokens_neox': 395, 'n_words': 86}