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

scooter

5.0.0 • Public • Published

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

install

npm i scooter

Downloadsweekly downloads

1,228

version

5.0.0

license

BSD-3-Clause

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
  • avatar
  • avatar
  • avatar
  • avatar