User-agent information plugin for hapi
Clone or download
danielb2 Hapi17 (#37)
* 4.0.0

* update for hapi17

* stricter semver requirement. export pkg. remove unneeded await. remove unneeded async declaration

* add package-lock to gitignore
Latest commit 96163af Dec 4, 2017
Permalink
Failed to load latest commit information.
images image Feb 10, 2013
lib Hapi17 (#37) Dec 4, 2017
test Hapi17 (#37) Dec 4, 2017
.gitignore Hapi17 (#37) Dec 4, 2017
.travis.yml Hapi17 (#37) Dec 4, 2017
CONTRIBUTING.md Create CONTRIBUTING.md Aug 11, 2014
LICENSE Update LICENSE Aug 4, 2014
README.md Update to follow node > 4 style standards May 6, 2016
package.json Hapi17 (#37) Dec 4, 2017

README.md

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, reply) => {

            return reply(request.plugins.scooter.toJSON());
        }
    });

    server.register(Scooter, (err) => {

        server.start(() => {

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