0.1.0 • Published 4 years ago
@voom/ip v0.1.0
@voom/ip
IP address information for Hapi.
This plugin exposes the client's ip address.
Installation
npm install @voom/ip
Usage
const IP = require('@voom/ip')
const Hapi = require('@hapi/hapi')
async function start () {
const server = Hapi.Server()
await server.register(IP)
server.route({
method: 'GET',
path: '/plugin',
handler (request, h) {
return request.ip()
}
})
await server.start()
}
start()
0.1.0
4 years ago