<commit_before>'use strict';

const logger = require('heroku-logger');
const db = require('./db');
const staticHttpServer = require('./staticHttpServer');
const createWsServer = require('./createWsServer');

const PORT = Number(process.env.PORT || 4000);
process.title = 'jcm2018-server';

db.connect();

staticHttpServer.listen(PORT, () => {
  logger.info(`Server is listening on port ${PORT}.`);
});

const originAllowed = origin => {
  // TODO: Implement same origin policy
  // (http://en.wikipedia.org/wiki/Same_origin_policy)
  return true;
};

createWsServer({ staticHttpServer, originAllowed });
<commit_msg>Fix a fatal typo after module rename.<commit_after>'use strict';

const logger = require('heroku-logger');
const db = require('./db');
const httpServer = require('./staticHttpServer');
const createWsServer = require('./createWsServer');

const PORT = Number(process.env.PORT || 4000);
process.title = 'jcm2018-server';

db.connect();

httpServer.listen(PORT, () => {
  logger.info(`Server is listening on port ${PORT}.`);
});

const originAllowed = origin => {
  // TODO: Implement same origin policy
  // (http://en.wikipedia.org/wiki/Same_origin_policy)
  return true;
};

createWsServer({ httpServer, originAllowed });

{'fraction_non_alphanumeric': 0.16720516962843296, 'fraction_numerical': 0.012924071082390954, 'mean_word_length': 5.014563106796117, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, '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': '1948996', 'n_tokens_mistral': 380, 'n_tokens_neox': 364, 'n_words': 90}