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

// db stuff
var dblogin = require('../dblogin.json');
var MongoClient = require('mongodb').MongoClient;
var assert = require('assert');
var url = 'mongodb://' + dblogin.user + ':' + dblogin.pw + '@' + dblogin.addr;

/* GET home page. */
router.get('/', function(req, res, next) {
  res.render('index', { title: 'Jason\'s Magical Brewing Land' });
});

router.route('/api/currentbrew')
  .get(function(req, res, next) {
    MongoClient.connect(url, function(err, db){
      db.collection('brews')
      .find({ complete: false })
      .toArray(function(err, docs) {
        assert.equal(err, null);
        console.log("Found the following records");
        console.dir(docs)
        res.json(docs);
      });      
    });
  });

router.route('/api/gettemps')
.get(function(req, res, next) {<commit_msg>minor update<commit_after>var express = require('express');
var router = express.Router();

// db stuff
var dblogin = require('../dblogin.json');
var MongoClient = require('mongodb').MongoClient;
var assert = require('assert');
var url = 'mongodb://' + dblogin.user + ':' + dblogin.pw + '@' + dblogin.addr;

/* GET home page. */
router.get('/', function(req, res, next) {
  res.render('index', { title: 'Magical Brewing Land' });
});

router.route('/api/currentbrew')
  .get(function(req, res, next) {
    MongoClient.connect(url, function(err, db){
      db.collection('brews')
      .find({ complete: false })
      .toArray(function(err, docs) {
        assert.equal(err, null);
        console.log("Found the following records");
        console.dir(docs)
        res.json(docs);
      });      
    });
  });

router.route('/api/gettemps')
.get(function(req, res, next) {
{'fraction_non_alphanumeric': 0.19409761634506242, 'fraction_numerical': 0.0, 'mean_word_length': 3.3423645320197046, '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': '2525923', 'n_tokens_mistral': 589, 'n_tokens_neox': 576, 'n_words': 122}