<commit_before>const express = require('express'),
  bodyParser = require('body-parser'),
  rollbar = require('rollbar'),
  morgan = require('morgan'),
  path = require('path'),
  config = require('./config'),
  routes = require('./app/routes'),
  orm = require('./app/orm'),
  errors = require('./app/middlewares/errors');

const init = () => {
  const app = express();
  const port = config.common.port || 8080;
  module.exports = app;

  app.use('/docs', express.static(path.join(__dirname, 'docs')));

  // Client must send "Content-Type: application/json" header
  app.use(bodyParser.json());
  app.use(bodyParser.urlencoded({ extended: true }));

  if (config.environment !== 'testing') {
    morgan.token('req-params', (req) => req.params);
    app.use(morgan('[:date[clf]] :remote-addr - Request ":method :url" with params: :req-params. Response status: :status.'));
  }

  orm.init(app).then(() => {
    routes.init(app);

    app.use(errors.handle);
    app.use(rollbar.errorHandler(config.common.rollbar.accessToken, {
      enabled: !!config.common.rollbar.accessToken,
      environment: config.environment
    }));

    app.listen(port);
    console.log(`Listening on port: ${port}`); // eslint-disable-line
  }).catch(console.log); // eslint-disable-line
};
<commit_msg>Moved the cap for max body size and parameter count<commit_after>const express = require('express'),
  bodyParser = require('body-parser'),
  rollbar = require('rollbar'),
  morgan = require('morgan'),
  path = require('path'),
  config = require('./config'),
  routes = require('./app/routes'),
  orm = require('./app/orm'),
  errors = require('./app/middlewares/errors');

const init = () => {
  const app = express();
  const port = config.common.port || 8080;
  module.exports = app;

  app.use('/docs', express.static(path.join(__dirname, 'docs')));

  // Client must send "Content-Type: application/json" header
  app.use(bodyParser.json({
    parameterLimit: 10000,
    limit: 1024 * 1024 * 10
  }));
  app.use(bodyParser.urlencoded({
    extended: true,
    parameterLimit: 10000,
    limit: 1024 * 1024 * 10
  }));

  if (config.environment !== 'testing') {
    morgan.token('req-params', (req) => req.params);
    app.use(morgan('[:date[clf]] :remote-addr - Request ":method :url" with params: :req-params. Response status: :status.'));
  }

  orm.init(app).then(() => {
    routes.init(app);

    app.use(errors.handle);
    app.use(rollbar.errorHandler(config.common.rollbar.accessToken, {
      enabled: !!config.common.rollbar.accessToken,
      environment: config.environment
    }));

    app.listen(port);
    console.log(`Listening on port: ${port}`); // eslint-disable-line
  }).catch(console.log); // eslint-disable-line
};

{'fraction_non_alphanumeric': 0.18937728937728937, 'fraction_numerical': 0.01391941391941392, 'mean_word_length': 3.7828371278458843, 'pattern_counts': {'":': 2, '<': 3, '<?xml version=': 0, '>': 9, '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': '2150951', 'n_tokens_mistral': 903, 'n_tokens_neox': 863, 'n_words': 173}