<commit_before>var fs = require('fs')
, path = require('path')
, repl1 = "var useragent = require('express-useragent');\nvar express = require('express');"
, repl2 = "app.use(useragent.express());    app.use(app.router);";


if (path.existsSync(app.root + '/config/environment.js')) {
    var data = fs.readFileSync(app.root + '/config/environment.js', 'utf8');
    if(!/var express = require('express');/gim.test(data) && !/app.use(app.router);/gim.test(data)) {
        data.replace(/var express = require('express');/gim,repl1)
            .replace(/app.use(app.router);/gim,repl2);
        fs.writeFileSync(app.root + '/config/environment.js', data, 'utf8');
    }
}

process.exit(0);<commit_msg>Fix install for CompoundJS<commit_after>var fs = require('fs')
, path = require('path')
, repl1 = "var useragent = require('express-useragent');\nvar express = require('express');"
, repl2 = "app.use(useragent.express());    app.use(app.router);";


if (path.existsSync(__dirname + '/config/environment.js')) {
    var data = fs.readFileSync(__dirname + '/config/environment.js', 'utf8');
    if(!/var express = require('express');/gim.test(data) && !/app.use(app.router);/gim.test(data)) {
        data.replace(/var express = require('express');/gim,repl1)
            .replace(/app.use(app.router);/gim,repl2);
        fs.writeFileSync(__dirname + '/config/environment.js', data, 'utf8');
    }
}

process.exit(0);
{'fraction_non_alphanumeric': 0.2097457627118644, 'fraction_numerical': 0.009887005649717515, 'mean_word_length': 4.115523465703971, 'pattern_counts': {'":': 0, '<': 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': '4277067', 'n_tokens_mistral': 486, 'n_tokens_neox': 482, 'n_words': 72}