scooter

User-agent information plugin.

Latest Version: 8.0.0
hapi-family
Installation:

npm: npm install @hapi/scooter

yarn: yarn add @hapi/scooter

Module Status:
Version License Node Dependencies CI
8.0.0
hapi helmet github logo
BSD 16, 18, 20, 22, 24 Dependency Status Build Status
6.0.1
hapi helmet github logo
BSD 16, 18, 20, 22, 24 Dependency Status Build Status

Usage

const Hapi = require('@hapi/hapi');
const Scooter = require('@hapi/scooter');

const start = async () => {

    const server = new Hapi.Server();

    server.route({
        method: 'GET',
        path: '/user-agent',
        handler: (request, h) => {

            return request.userAgent();
        }
    });

    await server.register(Scooter);
    await server.start();
    console.log(server.info.uri + '/user-agent');
};

start();