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

const port = process.env.PORT || 5000;
var node_env = process.env.node_env || 'development';
express.request.__proto__ = http2.IncomingMessage.prototype;
express.response.__proto__ = http2.ServerResponse.prototype;

app.set('port', port);
app.use(express.static(__dirname + '/dist'));
app.get('/[^\.]+$', function(req, res) {
  res.set('Content-Type', 'text/html').sendFile(path.join(__dirname, '/dist/index.html'));
});

let options = null;

if (node_env === 'development') {
  options = {
    allowHTTP1: true,
    key: fs.readFileSync('./certs/localhost.key'),
    cert: fs.readFileSync('./certs/localhost.crt')
  }
} else {
  options = {
    allowHTTP1: true,
    key: process.env.CERT,
    cert: process.env.CERT_KEY
  }
}

http2.createServer(options, app).listen(app.get('port'), (err) => {
  if (err) {
    throw new Error(err);
  }<commit_msg>Logging errors.<commit_after>var express = require('express');
var path = require('path');
var app = express();
var fs = require('fs');
var http2 = require('http2');

const port = process.env.PORT || 5000;
var node_env = process.env.node_env || 'development';\
console.log(node_env);
express.request.__proto__ = http2.IncomingMessage.prototype;
express.response.__proto__ = http2.ServerResponse.prototype;

app.set('port', port);
app.use(express.static(__dirname + '/dist'));
app.get('/[^\.]+$', function(req, res) {
  res.set('Content-Type', 'text/html').sendFile(path.join(__dirname, '/dist/index.html'));
});

let options = null;

if (node_env === 'development') {
  options = {
    allowHTTP1: true,
    key: fs.readFileSync('./certs/localhost.key'),
    cert: fs.readFileSync('./certs/localhost.crt')
  }
} else {
  options = {
    allowHTTP1: true,
    key: process.env.CERT,
    cert: process.env.CERT_KEY
  }
}

http2.createServer(options, app).listen(app.get('port'), (err) => {
  if (err) {
    throw new Error(err);
  }
{'fraction_non_alphanumeric': 0.1927236971484759, 'fraction_numerical': 0.010816125860373648, 'mean_word_length': 4.355263157894737, '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': '150725', 'n_tokens_mistral': 711, 'n_tokens_neox': 695, 'n_words': 134}