<commit_before>'use strict';
/**
 * @file middleware example
 * @module logger-request
 * @package logger-request
 * @subpackage examples
 * @version 0.0.4
 * @author hex7c0 <<EMAIL>>
 * @license GPLv3
 */

/**
 * initialize module
 */
// import
try {
    var logger = require('../index.min.js'); // use require('logger-request')
                                                // instead
    var app = require('express')();
} catch (MODULE_NOT_FOUND) {
    console.error(MODULE_NOT_FOUND);
    process.exit(1);
}

// using middleware
app.use(logger({
    filename: 'middleware.log'
}));

// express routing
app.get('/', function(req, res) {

    res.send('hello world!');
});
app.get('/err', function(req, res) {

    res.status(401).end('Unauthorized');
});
// server starting
app.listen(3000);
console.log('starting server on port 3000');<commit_msg>update require<commit_after>'use strict';
/**
 * @file middleware example
 * @module logger-request
 * @package logger-request
 * @subpackage examples
 * @version 0.0.4
 * @author hex7c0 <<EMAIL>>
 * @license GPLv3
 */

/**
 * initialize module
 */
// import
try {
    var logger = require('..'); // use require('logger-request') instead
    var app = require('express')();
} catch (MODULE_NOT_FOUND) {
    console.error(MODULE_NOT_FOUND);
    process.exit(1);
}

// using middleware
app.use(logger({
    filename: 'middleware.log'
}));

// express routing
app.get('/', function(req, res) {

    res.send('hello world!');
});
app.get('/err', function(req, res) {

    res.status(401).end('Unauthorized');
});
// server starting
app.listen(3000);
console.log('starting server on port 3000');
{'fraction_non_alphanumeric': 0.18320146074254412, 'fraction_numerical': 0.021911138161898967, 'mean_word_length': 3.303664921465969, 'pattern_counts': {'":': 0, '<': 7, '<?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': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6474007', 'n_tokens_mistral': 549, 'n_tokens_neox': 518, 'n_words': 118}