<commit_before>'use strict';

const Path = require('path');
const Package = require('../package.json');

exports.register = (server, options, next) => {

    server.register([
        {
            // Tag routes with "api" for use with swagger.
            register: require('hapi-swagger'),
            options: {
                basePath: server.info.uri,
                apiVersion: 1,
                enableDocumentationPage: false
            }
        },
        {
            register: require('bedwetter'),
            options: {
                actAsUser: true,
                userIdProperty: 'user.id',
                setOwner: false,
                requireOwner: false,
                userUrlPrefix: '/user',
                userModel: 'users',
                ownerAttr: 'owner',
                childOwnerAttr: 'owner'
            }
        },
        {
            register: require('inert')
        },
        {
            register: require('vision')
        }
    ],
    (err) => {<commit_msg>Leave bedwetter options to the routes<commit_after>'use strict';

const Path = require('path');
const Package = require('../package.json');

exports.register = (server, options, next) => {

    server.register([
        {
            // Tag routes with "api" for use with swagger.
            register: require('hapi-swagger'),
            options: {
                basePath: server.info.uri,
                apiVersion: 1,
                enableDocumentationPage: false
            }
        },
        {
            register: require('bedwetter')
        },
        {
            register: require('inert')
        },
        {
            register: require('vision')
        }
    ],
    (err) => {
{'fraction_non_alphanumeric': 0.12179487179487179, 'fraction_numerical': 0.0011655011655011655, 'mean_word_length': 1.3360544217687076, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, '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': '1913835', 'n_tokens_mistral': 451, 'n_tokens_neox': 430, 'n_words': 96}