Skip to content

echorohit/scooter

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

80 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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');
        });
    });

About

User-agent information plugin for hapi

Resources

License

Contributing

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 100.0%