0.1.0 • Published 4 years ago
@voom/ua v0.1.0
@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()
0.1.0
4 years ago