<commit_before>const app = require('express')();
const passport = require('passport');
const routes = require('./routes/index');
const bodyParser = require('body-parser');
const morgan = require('morgan');

// Get params
app.use(bodyParser.urlencoded({extended: false}));
app.use(bodyParser.json());

// Log to console
app.use(morgan('dev'));

// Handle routes
app.use('/api', routes);   

// Setup passport for auth
app.use(passport.initialize())
app.use(passport.session())

// Listen on port 3000
app.listen(3000, () => {
    console.info('Place listening on port 3000');
});<commit_msg>Not found page<commit_after>const app = require('express')();
const passport = require('passport');
const routes = require('./routes/index');
const bodyParser = require('body-parser');
const morgan = require('morgan');

// Get params
app.use(bodyParser.urlencoded({extended: false}));
app.use(bodyParser.json());

// Log to console
app.use(morgan('dev'));

// Handle routes
app.use('/api', routes);   

// Setup passport for auth
app.use(passport.initialize())
app.use(passport.session())

app.use(function(req, res, next){
    res.status(404);

    // respond with json
    if (req.accepts('json')) {
        res.send({ error: 'Not found' });
        return;
    }

    // send HTML
    res.render('404', { url: req.url });
});

// Listen on port 3000
app.listen(3000, () => {
    console.info('Place listening on port 3000');
});
{'fraction_non_alphanumeric': 0.1900070372976777, 'fraction_numerical': 0.0211118930330753, 'mean_word_length': 4.170909090909091, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '5030470', 'n_tokens_mistral': 471, 'n_tokens_neox': 438, 'n_words': 109}