<commit_before>import express from 'express'
import morgan from 'morgan'
import bodyParser from 'body-parser'
import compression from 'compression'

import renderRoute from './routes/render'

const isDev = process.env.NODE_ENV !== 'production'

var argv = require('yargs')
  .usage('Usage: $0 [--port NUM]')
  .describe('port', 'The port to listen to')
  .describe('debug', 'Print stack traces on error').alias('debug', 'd')
  .describe('whitelist', 'Whitelist a root directory where the javascript files can be')
  .default('port', process.env.PORT)
  .default('whitelist', process.env.REACT_WHITELIST)
  .help('h').alias('h', 'help')
  .argv;

var app = express();

app.use(bodyParser.json({limit: '50mb'}));
app.use(compression());
app.use('/bundle', express.static('build'));
app.use(function errorHandler(err, request, response, next) {
  console.log('[' + new Date().toISOString() + '] ' + err.stack);
  response.status(500).send(argv.debug ? err.stack : err.toString());
});

if (isDev) {
  app.use(morgan('tiny'));
}

app.get('/', function (req, res) {
  res.send('ok');
});

app.post('/render', renderRoute);

const server = app.listen(process.env.PORT || 6000, function() {
  console.log('Started server at port %s', server.address().port);
});

export default app;<commit_msg>Hotfix - 6000 is restricted apparently!<commit_after>import express from 'express'
import morgan from 'morgan'
import bodyParser from 'body-parser'
import compression from 'compression'

import renderRoute from './routes/render'

const isDev = process.env.NODE_ENV !== 'production'

var argv = require('yargs')
  .usage('Usage: $0 [--port NUM]')
  .describe('port', 'The port to listen to')
  .describe('debug', 'Print stack traces on error').alias('debug', 'd')
  .describe('whitelist', 'Whitelist a root directory where the javascript files can be')
  .default('port', process.env.PORT)
  .default('whitelist', process.env.REACT_WHITELIST)
  .help('h').alias('h', 'help')
  .argv;

var app = express();

app.use(bodyParser.json({limit: '50mb'}));
app.use(compression());
app.use('/bundle', express.static('build'));
app.use(function errorHandler(err, request, response, next) {
  console.log('[' + new Date().toISOString() + '] ' + err.stack);
  response.status(500).send(argv.debug ? err.stack : err.toString());
});

if (isDev) {
  app.use(morgan('tiny'));
}

app.get('/', function (req, res) {
  res.send('ok');
});

app.post('/render', renderRoute);

const server = app.listen(process.env.PORT || 60000, function() {
  console.log('Started server at port %s', server.address().port);
});

export default app;
{'fraction_non_alphanumeric': 0.1922337562475971, 'fraction_numerical': 0.009611687812379853, 'mean_word_length': 5.065268065268065, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '2592262', 'n_tokens_mistral': 881, 'n_tokens_neox': 853, 'n_words': 215}