<commit_before>/*jshint esversion:6, node:true*/
'use strict';

var express = require('express');
var router = express.Router();
var applyPolicies = require('../middleware/core.io-auth').applyPolicies;

module.exports = function(app, config){

    let policies = applyPolicies('GET /hello', app, config);

    router.get('/hello', policies, (req, res)=>{
        console.log('/hello');
        res.status(200).send('<b>Hello</b>');
    });

    router.get('/testing', [], (req, res)=>{
        console.log('/testing');
        res.status(200).send('<b>Testing</b>');
    });

    app.use('/', router);
};
<commit_msg>example: myapp routes home<commit_after>/*jshint esversion:6, node:true*/
'use strict';

var express = require('express');
var router = express.Router();
var applyPolicies = require('../middleware/core.io-auth').applyPolicies;

module.exports = function(app, config){

    let policies = applyPolicies('GET /hello', app, config);

    router.get('/hello', policies, (req, res)=>{
        console.log('/hello');
        res.status(200).send('<b>Hello '+ req.user.name + '</b>');
    });

    router.get('/testing', [], (req, res)=>{
        console.log('/testing');
        res.status(200).send('<b>Testing</b>');
    });

    app.use('/', router);
};

{'fraction_non_alphanumeric': 0.22318611987381703, 'fraction_numerical': 0.011041009463722398, 'mean_word_length': 3.532142857142857, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 15, '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': '94821', 'n_tokens_mistral': 420, 'n_tokens_neox': 404, 'n_words': 77}