<commit_before>// Enable promise error logging
require('promise/lib/rejection-tracking').enable();

var express = require('express');
var app = express();
var certificate = require('./src/certificate')

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

app.use(express.static(__dirname + '/public'));

app.set('views', __dirname + '/views');
app.set('view engine', 'ejs');

app.get('/', function(request, response) {
  var promise = certificate.getCertificationData();

  certificate.getCertificationData().then(function(data) {
    responseData = {
      certInfo: JSON.stringify(data),
      runDate: new Date().toDateString()
    }

    if(request.headers['content-type'] == 'application/json') {
      response.json(responseData);<commit_msg>Remove redundant call to getCertificationData()<commit_after>// Enable promise error logging
require('promise/lib/rejection-tracking').enable();

var express = require('express');
var app = express();
var certificate = require('./src/certificate')

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

app.use(express.static(__dirname + '/public'));

app.set('views', __dirname + '/views');
app.set('view engine', 'ejs');

app.get('/', function(request, response) {
  certificate.getCertificationData().then(function(data) {
    responseData = {
      certInfo: JSON.stringify(data),
      runDate: new Date().toDateString()
    }

    if(request.headers['content-type'] == 'application/json') {
      response.json(responseData);
{'fraction_non_alphanumeric': 0.1795221843003413, 'fraction_numerical': 0.005460750853242321, 'mean_word_length': 4.935222672064778, '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': '5051301', 'n_tokens_mistral': 440, 'n_tokens_neox': 426, 'n_words': 84}