<commit_before>var express = require('express');
var jade = require('jade');
var fs = require('fs');
var router = express.Router();

/* GET home page. */
router.post('/', function(req, res, next) {
  if (logMessages.length >= conf.maxLines) {
    logMessages.shift()
  }
  
  var lines = []
  req.body.forEach(function(line){
    logMessages.push(line)
    lines.push(line)
  })

  fs.readFile('views/modules/line.jade', 'utf8', function (err, data) {
    if (err) {
      throw err
    }
    var fn = jade.compile(data)
    var html = fn({
      lines: lines
    })
    broadcast(html)
  })

  res.render('receive', { title: 'Received' });
});

module.exports = router;<commit_msg>body.<commit_after>var express = require('express');
var jade = require('jade');
var fs = require('fs');
var router = express.Router();

/* GET home page. */
router.post('/', function(req, res, next) {
  if (logMessages.length >= conf.maxLines) {
    logMessages.shift()
  }
  
  console.log(req.body)

  var lines = []
  req.body.forEach(function(line){
    logMessages.push(line)
    lines.push(line)
  })

  fs.readFile('views/modules/line.jade', 'utf8', function (err, data) {
    if (err) {
      throw err
    }
    var fn = jade.compile(data)
    var html = fn({
      lines: lines
    })
    broadcast(html)
  })

  res.render('receive', { title: 'Received' });
});

module.exports = router;
{'fraction_non_alphanumeric': 0.1788559015206372, 'fraction_numerical': 0.001448225923244026, 'mean_word_length': 3.088757396449704, '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': '303560', 'n_tokens_mistral': 480, 'n_tokens_neox': 473, 'n_words': 102}