<commit_before>const http = require('http');
const app = require('express')();
const serveStatic = require('serve-static')
const statusFaker = require('./statusFaker');

function startFakerServer(port) {
  app.get('/status', statusFaker.fakeStatus);
  app.get('/loadCpu/:loadFactor', statusFaker.loadCpu);
  app.get('/exit', statusFaker.exit);
  app.set('port', port);

  return http
    .createServer(app)
    .listen(port, () => {
      console.log('Started http server on port', port);
    });
}

function startStaticServer(port) {
  app.use(serveStatic('public', {}));

  return http
    .createServer(app)
    .listen(port, () => {
      console.log('Started http server on port', port);
    });
}

function startServer(port=8001) {
  startFakerServer(port);
  startStaticServer(8000)
}

module.exports = startServer;
<commit_msg>update public to src/public<commit_after>const http = require('http');
const app = require('express')();
const serveStatic = require('serve-static')
const statusFaker = require('./statusFaker');

function startFakerServer(port) {
  app.get('/status', statusFaker.fakeStatus);
  app.get('/loadCpu/:loadFactor', statusFaker.loadCpu);
  app.get('/exit', statusFaker.exit);
  app.set('port', port);

  return http
    .createServer(app)
    .listen(port, () => {
      console.log('Started http server on port', port);
    });
}

function startStaticServer(port) {
  app.use(serveStatic('./src/public', {}));

  return http
    .createServer(app)
    .listen(port, () => {
      console.log('Started http server on port', port);
    });
}

function startServer(port=8001) {
  startFakerServer(port);
  startStaticServer(8000)
}

module.exports = startServer;

{'fraction_non_alphanumeric': 0.16923076923076924, 'fraction_numerical': 0.009467455621301775, 'mean_word_length': 4.385350318471337, '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': '4408525', 'n_tokens_mistral': 554, 'n_tokens_neox': 543, 'n_words': 105}