<commit_before>const express = require('express');
const path = require('path');

const DEFAULT_PORT = 3000;

const port = process.env.PORT || DEFAULT_PORT;
const app = express();

if (process.env.NODE_ENV === 'DEV') {
  // Step 1: Create & configure a webpack compiler
  const webpack = require('webpack');
  const webpackConfig = require('./webpack.config');
  const compiler = webpack(webpackConfig);

  // Step 2: Attach the dev middleware to the compiler & the server
  app.use(
    require('webpack-dev-middleware')(compiler, {
      noInfo: true,
      publicPath: webpackConfig.output.publicPath,
    }),
  );

  // Step 3: Attach the hot middleware to the compiler & the server
  app.use(
    require('webpack-hot-middleware')(compiler, {
      heartbeat: 10000,
      // eslint-disable-next-line no-console
      log: console.log,
      path: '/__webpack_hmr',
    }),
  );
}

app.use('/', express.static(path.join(__dirname, 'dist')));

const server = app.listen(port, () => {
  server.keepAliveTimeout = 0;
  process.stdout.write(`listening on port ${port}\n`);
});<commit_msg>removed trailing commas<commit_after>const express = require('express');
const path = require('path');

const DEFAULT_PORT = 3000;

const port = process.env.PORT || DEFAULT_PORT;
const app = express();

if (process.env.NODE_ENV === 'DEV') {
  // Step 1: Create & configure a webpack compiler
  const webpack = require('webpack');
  const webpackConfig = require('./webpack.config');
  const compiler = webpack(webpackConfig);

  // Step 2: Attach the dev middleware to the compiler & the server
  app.use(
    require('webpack-dev-middleware')(compiler, {
      noInfo: true,
      publicPath: webpackConfig.output.publicPath,
    })
  );

  // Step 3: Attach the hot middleware to the compiler & the server
  app.use(
    require('webpack-hot-middleware')(compiler, {
      heartbeat: 10000,
      // eslint-disable-next-line no-console
      log: console.log,
      path: '/__webpack_hmr',
    })
  );
}

app.use('/', express.static(path.join(__dirname, 'dist')));

const server = app.listen(port, () => {
  server.keepAliveTimeout = 0;
  process.stdout.write(`listening on port ${port}\n`);
});
{'fraction_non_alphanumeric': 0.15096065873741996, 'fraction_numerical': 0.011893870082342177, 'mean_word_length': 3.6042105263157893, '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': '578370', 'n_tokens_mistral': 702, 'n_tokens_neox': 674, 'n_words': 172}