<commit_before>var express = require('express'),
    app = express(),
    coffeeBear = require('./coffee-bear');

// configuration
app.set('port', process.env.PORT || 5000);

app.get('/api/v1/measurements/:cups?', function (req, res) {
  coffeeBear(function (err, data) {
    var cups = req.params.cups;

    if (err) { res.json(500, {error: err}); }

    console.log(cups);

    if (cups === undefined) {
      res.json(data);
      return;
    }

    if (data[cups] !== undefined) {
      res.json(data[cups]);
      return;
    }

    res.json(404, {error: 'Measurement not found' });
  });
});

app.listen(app.get('port'), function () {
  console.log('listening on port ' + app.get('port'));
});<commit_msg>remove console log<commit_after>var express = require('express'),
    app = express(),
    coffeeBear = require('./coffee-bear');

// configuration
app.set('port', process.env.PORT || 5000);

app.get('/api/v1/measurements/:cups?', function (req, res) {
  coffeeBear(function (err, data) {
    var cups = req.params.cups;

    if (err) { res.json(500, {error: err}); }

    if (cups === undefined) {
      res.json(data);
      return;
    }

    if (data[cups] !== undefined) {
      res.json(data[cups]);
      return;
    }

    res.json(404, {error: 'Measurement not found' });
  });
});

app.listen(app.get('port'), function () {
  console.log('listening on port ' + app.get('port'));
});
{'fraction_non_alphanumeric': 0.20384889522451888, 'fraction_numerical': 0.015680684248039915, 'mean_word_length': 3.1052631578947367, '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': '429283', 'n_tokens_mistral': 511, 'n_tokens_neox': 489, 'n_words': 97}