@voom/ua

0.1.0 • Public • Published

@voom/ua

User-agent information for Hapi.

This plugin exposes the client's user-agent.

Installation

npm install @voom/ua

Usage

const UA = require('@voom/ua')
const Hapi = require('@hapi/hapi')

async function start () {
  const server = Hapi.Server()

  await server.register(UA)

  server.route({
    method: 'GET',
    path: '/plugin',
    handler (request, h) {
      return request.ua()
    }
  })

  await server.start()
}

start()

Readme

Keywords

Package Sidebar

Install

npm i @voom/ua

Weekly Downloads

1

Version

0.1.0

License

MIT

Unpacked Size

4.21 kB

Total Files

6

Last publish

Collaborators

  • spridev