<commit_before>  var express = require('express');
  var app = express();

  // Setup express
  var express_port = process.env.PORT || 3000;

  app.get('/v1/timers', function(req, res) {
      // var timers = JSON.stringify(targets);
      console.log(targets);
      var timers_copy = [];

      // Filter out and prepare the target data for API
      // TODO Probably better to do this with a reduce filter in underscore than a loop.

      _.each(targets, function(value, key) {
        var target = {
          "lastCollected":value.lastCollected,
          "lastResult":value.lastResult,
          "target":value.target
        };
        timers_copy.push(target);
      });

      res.json(timers_copy);
  });

  app.get('/v1/metrics', function(req, res) {

      // TODO Metrics should be here
      var metrics = {};
      res.json(metrics);

  });

  app.delete('/v1/timer/:id', function(req, res) {
    // TODO add a delete endpoint to force remove targets? Probably easier just to recommend to restart the container
  });

  app.listen(express_port);<commit_msg>Added health endpoint<commit_after>  var express = require('express');
  var app = express();

  // Setup express
  var express_port = process.env.PORT || 3000;

  app.get('/v1/timers', function(req, res) {
      // var timers = JSON.stringify(targets);
      console.log(targets);
      var timers_copy = [];

      // Filter out and prepare the target data for API
      // TODO Probably better to do this with a reduce filter in underscore than a loop.

      _.each(targets, function(value, key) {
        var target = {
          "lastCollected":value.lastCollected,
          "lastResult":value.lastResult,
          "target":value.target
        };
        timers_copy.push(target);
      });

      res.json(timers_copy);
  });

  app.get('/v1/metrics', function(req, res) {

      // TODO Metrics should be here
      var metrics = {};
      res.json(metrics);

  });

  app.get('/v1/health', function(req, res) {

      // TODO HEALTH should be here
      var health = {};
      res.json(health);

  });

  app.delete('/v1/timer/:id', function(req, res) {
    // TODO add a delete endpoint to force remove targets? Probably easier just to recommend to restart the container
  });

  app.listen(express_port);
{'fraction_non_alphanumeric': 0.13094718463553034, 'fraction_numerical': 0.006547359231776516, 'mean_word_length': 2.4832826747720365, 'pattern_counts': {'":': 6, '<': 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': '3977553', 'n_tokens_mistral': 697, 'n_tokens_neox': 660, 'n_words': 190}