<commit_before>'use strict';

require('@babel/register');
require('@babel/polyfill');
const express = require('express');
const path = require('path');
const app = express();
app.use(express.static(path.resolve(__dirname, './public')));
if (process.env.NODE_ENV === 'production') {
  app.get('*', (req, res) => {
    res.sendFile(path.resolve(__dirname, './public', '/index.html'));
  });
  require('greenlock-express')
    .create({
      version: 'draft-12',
      configDir: '~/.config/acme',
      server: 'https://acme-v02.api.letsencrypt.org/directory',
      approveDomains: function approveDomains(opts, certs, cb) {
        if (certs) {
          opts.domains = certs.altnames;
        } else {
          opts.email = '<EMAIL>';
          opts.agreeTos = true;
        }

        cb(null, { options: opts, certs });
      },
      app: app
    })
    .listen(80, 443);
} else {
  const server = require('./webpack/webpack.dev').default(app);
  const http = require('http');
  const DEV_PORT = process.env.PORT;

  http.createServer(server).listen(DEV_PORT, function() {
    console.log('Server listening on port:', DEV_PORT);
  });
}<commit_msg>major fix<commit_after>'use strict';

require('@babel/register');
require('@babel/polyfill');
const express = require('express');
const path = require('path');
const app = express();
if (process.env.NODE_ENV === 'production') {
  app.get('*', (req, res) => {
    res.sendFile(path.resolve(__dirname, './public', '/index.html'));
  });
  require('greenlock-express')
    .create({
      version: 'draft-12',
      configDir: '~/.config/acme',
      server: 'https://acme-v02.api.letsencrypt.org/directory',
      approveDomains: function approveDomains(opts, certs, cb) {
        if (certs) {
          opts.domains = certs.altnames;
        } else {
          opts.email = '<EMAIL>';
          opts.agreeTos = true;
        }

        cb(null, { options: opts, certs });
      },
      app: app
    })
    .listen(80, 443);
} else {
  const server = require('./webpack/webpack.dev').default(app);
  server.use(express.static(path.resolve(__dirname, './public')));
  const http = require('http');
  const DEV_PORT = process.env.PORT;

  http.createServer(server).listen(DEV_PORT, function() {
    console.log('Server listening on port:', DEV_PORT);
  });
}
{'fraction_non_alphanumeric': 0.18709398007795583, 'fraction_numerical': 0.007795582503248159, 'mean_word_length': 3.110320284697509, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 7, 'https://': 2, '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': '386523', 'n_tokens_mistral': 767, 'n_tokens_neox': 735, 'n_words': 143}