<commit_before>var express = require('express'),
    path = require('path'),
    filters = require('./filters'),
    routes = require('./route'),
    apis = require('./api'),
    logger = require('./logger'),
    consolidate = require('consolidate');

var app = express();
app.engine('html', consolidate.ejs);
app.set('views', '../assets/dist');
app.set('view engine', 'html');
app.set('x-powered-by', false);

filters.forEach((filter) => {
    if (filter.route) {
        app.all(filter.route, filter.filter);
    } else {
        app.use(filter.filter);
    }
});
apis.forEach((api) => {
    var method = api.method || 'get';
    app[method](api.route, api.func);
});
routes.forEach((route) => {
    app.use(route.route, route.router);
});

app.use(express.static(path.resolve('../assets/dist')));

app.listen(3003, function () {
    logger.info(`Backend service listening on port 3003!`);
});
<commit_msg>refactor<commit_after>var express = require('express'),
    path = require('path'),
    filters = require('./filters'),
    routes = require('./route'),
    apis = require('./api'),
    logger = require('./logger'),
    consolidate = require('consolidate');

var app = express();
app.engine('html', consolidate.ejs);
app.set('views', '../assets/dist');
app.set('view engine', 'html');
app.set('x-powered-by', false);

filters.forEach((filter) => {
    if (filter.route) {
        app.all(filter.route, filter.filter);
    } else {
        app.use(filter.filter);
    }
});
apis.forEach((api) => {
    var method = api.method || 'get';
    app[method](api.route, api.func);
});
routes.forEach((route) => {
    app.use(route.route, route.router);
});

app.use(express.static(path.resolve('../assets/dist')));

app.listen(3003, () => {
    logger.info(`Backend service listening on port 3003!`);
});

{'fraction_non_alphanumeric': 0.22160664819944598, 'fraction_numerical': 0.00886426592797784, 'mean_word_length': 3.6426735218508997, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 10, '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': '1614383', 'n_tokens_mistral': 588, 'n_tokens_neox': 585, 'n_words': 105}