<commit_before>var path = require('path');
var express = require('express');
var webpack = require('webpack');
var config = require('config');
var debug = require('debug')('server');

var api = require('./api');
var __DEV__ = process.env.NODE_ENV === 'development';

var app = express();

if (__DEV__) {
  var webpackConfig = require('./webpack.config.dev');
  var compiler = webpack(webpackConfig);
  app.use(require('webpack-dev-middleware')(compiler, {
    noInfo: true,
    publicPath: webpackConfig.output.publicPath,
  }));
  app.use(require('webpack-hot-middleware')(compiler));
}

app.use('/api', api);

app.use(express.static(__DEV__ ? 'app' : 'dist'));

app.get('*', function (req, res) {
  res.sendFile(path.join(__dirname, __DEV__ ? 'app' : 'dist', 'index.html'));
});

app.listen(config.port, 'localhost', function (err) {
  if (err) {
    debug(err);
    return;
  }
  debug('Listening at http://localhost:' + config.port);
});<commit_msg>Listen to 0.0.0.0 instead of localhost<commit_after>var path = require('path');
var express = require('express');
var webpack = require('webpack');
var config = require('config');
var debug = require('debug')('server');

var api = require('./api');
var __DEV__ = process.env.NODE_ENV === 'development';

var app = express();

if (__DEV__) {
  var webpackConfig = require('./webpack.config.dev');
  var compiler = webpack(webpackConfig);
  app.use(require('webpack-dev-middleware')(compiler, {
    noInfo: true,
    publicPath: webpackConfig.output.publicPath,
  }));
  app.use(require('webpack-hot-middleware')(compiler));
}

app.use('/api', api);

app.use(express.static(__DEV__ ? 'app' : 'dist'));

app.get('*', function (req, res) {
  res.sendFile(path.join(__dirname, __DEV__ ? 'app' : 'dist', 'index.html'));
});

app.listen(config.port, '0.0.0.0', function (err) {
  if (err) {
    debug(err);
    return;
  }
  debug('Listening at http://0.0.0.0:' + config.port);
});
{'fraction_non_alphanumeric': 0.20498183705241307, 'fraction_numerical': 0.006227296315516347, 'mean_word_length': 4.755223880597015, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 3, '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': '1391051', 'n_tokens_mistral': 652, 'n_tokens_neox': 649, 'n_words': 135}