<commit_before>var express = require('express');
var app = express();

// Setup Named Routes
var Router = require('named-routes');
var router = new Router();
router.extendExpress(app);
router.registerAppHelpers(app);

app.use('/static', express.static('resources'));

var twig = require('twig');
twig.extendFunction('is_granted', function (role_name) {
    return true;
});
app.set('twig options', {
    strict_variables: false
})
app.set('view engine', twig.__express);

app.get('/', 'index', function (request, response) {
    response.render('index.html.twig', {articles: []});
})


var server = app.listen(8080, function () {
    var host = server.address().address;
    var port = server.address().port;

    console.log('Server listening on http://%s:%s', host, port);
})<commit_msg>Added comments to app.js<commit_after>var express = require('express');
var app = express();

// Setup Named Routes
var Router = require('named-routes');
var router = new Router();
router.extendExpress(app);
router.registerAppHelpers(app);

// Define Static Resources Directory with virtual path
app.use('/static', express.static('resources'));

// Setup Twig
var twig = require('twig');
twig.extendFunction('is_granted', function (role_name) {
    return true;
});
app.set('twig options', {
    strict_variables: false
})
app.set('view engine', twig.__express);

// Routing
app.get('/', 'index', function (request, response) {
    response.render('index.html.twig', {articles: []});
})

// Init Server and Listen
var server = app.listen(8080, function () {
    var host = server.address().address;
    var port = server.address().port;

    console.log('Server listening on http://%s:%s', host, port);
})
{'fraction_non_alphanumeric': 0.17768595041322313, 'fraction_numerical': 0.004722550177095631, 'mean_word_length': 4.76530612244898, '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': '3539888', 'n_tokens_mistral': 529, 'n_tokens_neox': 519, 'n_words': 133}