scooterdeprecated

User-agent information plugin for hapi

Usage no npm install needed!

<script type="module">
  import scooter from 'https://cdn.skypack.dev/scooter';
</script>

README

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