node package manager
Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »

scooter

scooter Logo

Scooter is a User-agent information plugin for hapi

Build Status

Lead Maintainer: Daniel Bretoi

Scooter uses the useragent package to provide user-agent information. For more details of what information scooter provides, please see the useragent web-page.

Usage

    const Hapi = require('hapi');
    const server = new Hapi.Server(8086);
    const Scooter = require('scooter');
 
    server.route({
        method: 'GET',
        path: '/user-agent',
        handler: (request, h) => {
 
            return request.plugins.scooter.toJSON();
        }
    });
 
    await server.register(Scooter);
 
    await server.start();

For versions of hapi less than 17, use 5.x