<commit_before>'use strict';

// Setup HAPI
const Hapi = require('hapi');
const path = require('path');
const server = new Hapi.Server();
let isSetup = false;

module.exports.server = server;

module.exports.setup = function (argv) {
    if (!isSetup) {
        isSetup = true;
        let defaults;

        if (argv === 'test') {
            defaults = {
                port: 3000,
                host: 'localhost'
            };
        } else {
            defaults = argv;
        }

        server.path(path.join(__dirname, '..'));

        server.connection({
            port: defaults.port,
            host: defaults.host,
            labels: ['view', 'api'],
            routes: {
                files: {
                    relativeTo: path.join(__dirname, '..')
                }
            }
        });

        server.register(
            [
                {
                    register: require('inert')
                },
                {
                    register: require('vision')
                },
                {
                    register: require('scooter')
                },
                {
                    register: require('blankie'),
                    options: {
                        fontSrc: ['self', 'oss.maxcdn.com', 'data:'],
                        styleSrc: ['self', 'oss.maxcdn.com', 'netdna.bootstrapcdn.com']
                    }
                },
                {
                    register: require('good'),
                    options: {
                        opsInterval: 60000,
                        reporters: [
                            {
                                reporter: require('good-file'),
                                events: {
                                    log: '*',
                                    response: '*'
                                },
                                config: 'request.log'
                            },
                            {
                                reporter: require('good-file'),
                                events: {
                                    ops: '*'<commit_msg>allow bootstrap glyphicons<commit_after>'use strict';

// Setup HAPI
const Hapi = require('hapi');
const path = require('path');
const server = new Hapi.Server();
let isSetup = false;

module.exports.server = server;

module.exports.setup = function (argv) {
    if (!isSetup) {
        isSetup = true;
        let defaults;

        if (argv === 'test') {
            defaults = {
                port: 3000,
                host: 'localhost'
            };
        } else {
            defaults = argv;
        }

        server.path(path.join(__dirname, '..'));

        server.connection({
            port: defaults.port,
            host: defaults.host,
            labels: ['view', 'api'],
            routes: {
                files: {
                    relativeTo: path.join(__dirname, '..')
                }
            }
        });

        server.register(
            [
                {
                    register: require('inert')
                },
                {
                    register: require('vision')
                },
                {
                    register: require('scooter')
                },
                {
                    register: require('blankie'),
                    options: {
                        fontSrc: ['self', 'oss.maxcdn.com', 'netdna.bootstrapcdn.com', 'data:'],
                        styleSrc: ['self', 'oss.maxcdn.com', 'netdna.bootstrapcdn.com']
                    }
                },
                {
                    register: require('good'),
                    options: {
                        opsInterval: 60000,
                        reporters: [
                            {
                                reporter: require('good-file'),
                                events: {
                                    log: '*',
                                    response: '*'
                                },
                                config: 'request.log'
                            },
                            {
                                reporter: require('good-file'),
                                events: {
                                    ops: '*'
{'fraction_non_alphanumeric': 0.11108534322820036, 'fraction_numerical': 0.004174397031539889, 'mean_word_length': 0.7618464052287581, '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': 9, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2793280', 'n_tokens_mistral': 1029, 'n_tokens_neox': 925, 'n_words': 177}