<commit_before>'use strict';

const express = require('express');
const cookieParser = require('cookie-parser');
const app = express();
const bodyParser = require('body-parser');

const config = require('js.shared').config;
// initialize config from package.json
const p = require('../package.json');
config.init(p.locals);

const routes = require('./routes');
const auth = require('./auth');
const errors = require('./errors');


// various middleware parsers
app.use(bodyParser.urlencoded({
    extended: false
}));
app.use(bodyParser.json());
app.use(cookieParser());

// authentication filter
app.use(auth.authFilter);

// routes
app.use(routes);
// any other routes:
if (config.get('server.html5-support', true)) {
    app.all('/*', (req, res, next) => {
        res.sendFile('index.html', {
            root: 'build/'
        });
    });
}

// error handling
app.use(errors);<commit_msg>minor fix<commit_after>'use strict';

const express = require('express');
const cookieParser = require('cookie-parser');
const app = express();
const bodyParser = require('body-parser');

const config = require('js.shared').config;
// initialize config from package.json
const p = require('../package.json');
config.init(p.locals);

const routes = require('./routes');
const auth = require('./auth');
const errors = require('./errors');


// various middleware parsers
app.use(bodyParser.urlencoded({
    extended: false
}));
app.use(bodyParser.json());
app.use(cookieParser());

// authentication filter
app.use(auth.authFilter);

// routes
app.use(routes);
// any other routes:
if (config.get('server.html5-support', true)) {
    const homePage = __dirname + '/../build/';
    app.all('/*', (req, res, next) => {
        res.sendFile('index.html', {
            root: homePage
        });
    });
}

// error handling
app.use(errors);
{'fraction_non_alphanumeric': 0.18972115910333515, 'fraction_numerical': 0.0010934937124111536, 'mean_word_length': 3.893048128342246, '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': '1620807', 'n_tokens_mistral': 550, 'n_tokens_neox': 548, 'n_words': 130}