<commit_before>#!/usr/bin/env node
const cluster = require('cluster');

if (cluster.isMaster) {
    cluster.fork();
    cluster.on('exit', () => {
        console.log('node-direct is crashed. Restarting...');
        cluster.fork();
    });
}

if (cluster.isWorker) {
    const express = require('express');
    const bodyParser = require('body-parser');
    const {
        port = 8123,
        root = process.cwd(),
        standalone
    } = require('minimist')(process.argv.slice(2));
    const middleware = require('./middleware');

    const app = express();

    app.use(bodyParser.urlencoded({ extended: false }));
    app.use(bodyParser.json());
    app.use(middleware);

    if (standalone) {
        app.use(express.static(root));
    }

    app.listen(port, () => {
        console.log(`node-direct listening on port ${port}!`);
    });
}<commit_msg>fix: Extended bodyparser<commit_after>#!/usr/bin/env node
const cluster = require('cluster');

if (cluster.isMaster) {
    cluster.fork();
    cluster.on('exit', () => {
        console.log('node-direct is crashed. Restarting...');
        cluster.fork();
    });
}

if (cluster.isWorker) {
    const express = require('express');
    const bodyParser = require('body-parser');
    const {
        port = 8123,
        root = process.cwd(),
        standalone
    } = require('minimist')(process.argv.slice(2));
    const middleware = require('./middleware');

    const app = express();

    app.use(bodyParser.urlencoded({ extended: true }));
    app.use(bodyParser.json());
    app.use(middleware);

    if (standalone) {
        app.use(express.static(root));
    }

    app.listen(port, () => {
        console.log(`node-direct listening on port ${port}!`);
    });
}
{'fraction_non_alphanumeric': 0.18050749711649366, 'fraction_numerical': 0.0057670126874279125, 'mean_word_length': 2.7635574837310197, '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': '3568797', 'n_tokens_mistral': 552, 'n_tokens_neox': 533, 'n_words': 100}