<commit_before>const path = require('path');
const express = require('express');
const webpack = require('webpack');
const webpackMiddleware = require('webpack-dev-middleware');
const webpackHotMiddleware = require('webpack-hot-middleware');
const config = require('./webpack.config.js');

const isDeveloping = process.env.NODE_ENV !== 'production';
const port = isDeveloping ? 8081 : process.env.PORT;
const app = express();
const serve = (path, cache) => express.static(__dirname + path);

if (isDeveloping) {
  const compiler = webpack(config);
  const middleware = webpackMiddleware(compiler, {
    publicPath: config.output.publicPath,
    // contentBase: 'src',
    // stats: {
    //   colors: true,
    //   hash: false,
    //   timings: true,
    //   chunks: false,
    //   chunkModules: false,
    //   modules: false
    // }
  });

	app.use(serve('/app'));
  // app.use(serve('/build'));

  app.use(middleware);
  app.use(webpackHotMiddleware(compiler));
  app.get('*', function response(req, res) {
		res.sendFile(path.join(__dirname, '/index.html'));
  });
} else {
  // app.use(serve('/build'));
  app.get('*', function response(req, res) {<commit_msg>move webpack to dev area<commit_after>const path = require('path');
const express = require('express');
const config = require('./webpack.config.js');

const isDeveloping = process.env.NODE_ENV !== 'production';
const port = isDeveloping ? 8081 : process.env.PORT;
const app = express();
const serve = (path, cache) => express.static(__dirname + path);

if (isDeveloping) {
  const webpack = require('webpack');
  const webpackMiddleware = require('webpack-dev-middleware');
  const webpackHotMiddleware = require('webpack-hot-middleware');
  const compiler = webpack(config);
  const middleware = webpackMiddleware(compiler, {
    publicPath: config.output.publicPath,
    // contentBase: 'src',
    // stats: {
    //   colors: true,
    //   hash: false,
    //   timings: true,
    //   chunks: false,
    //   chunkModules: false,
    //   modules: false
    // }
  });

	app.use(serve('/app'));
  // app.use(serve('/build'));

  app.use(middleware);
  app.use(webpackHotMiddleware(compiler));
  app.get('*', function response(req, res) {
		res.sendFile(path.join(__dirname, '/index.html'));
  });
} else {
  // app.use(serve('/build'));
  app.get('*', function response(req, res) {
{'fraction_non_alphanumeric': 0.17734408145948238, 'fraction_numerical': 0.0033941450997030122, 'mean_word_length': 3.7254509018036073, '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': 6, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6828806', 'n_tokens_mistral': 745, 'n_tokens_neox': 738, 'n_words': 158}