<commit_before>var fs = require("fs");
var mkdirp = require('mkdirp');

module.exports = {
    "server": {
        "options": {
            "port": 8000,
            "base": ".",
            middleware: function(connect, options, middlewares) {
                // inject a custom middleware into the array of default middlewares
                middlewares.unshift(function(req, res, next) {
                    if (req && req.method === "POST") {
                        mkdirp.sync(__dirname.replace('build','test/coverage/reports/'));
                        fs.writeFile(__dirname.replace('build','test/coverage/reports/coverage.json'), JSON.stringify(req.body), function (err) {<commit_msg>fixed reports<commit_after>var fs = require("fs");
var mkdirp = require('mkdirp');

module.exports = {
    "server": {
        "options": {
            "port": 8000,
            "base": ".",
            middleware: function(connect, options, middlewares) {
                // inject a custom middleware into the array of default middlewares - this middleware captures the coverage report generated by istanbul
                middlewares.unshift(function(req, res, next) {
                    if (req && req.method === "POST") {
                        mkdirp.sync('test/coverage/reports/');
                        fs.writeFile('test/coverage/reports/coverage.json', JSON.stringify(req.body), function (err) {
{'fraction_non_alphanumeric': 0.13594306049822064, 'fraction_numerical': 0.0056939501779359435, 'mean_word_length': 2.131403118040089, 'pattern_counts': {'":': 8, '<': 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': '5783685', 'n_tokens_mistral': 394, 'n_tokens_neox': 366, 'n_words': 86}