@defra/hapi-connect
v1.0.1
Published
A hapi plugin to mount `connect` based middleware at a route
Downloads
1,125
Readme
Hapi Connect
Hapi Connect is a Hapi plugin to mount connect based middleware at a route.
Installing
npm install @defra/hapi-connect
Usage
Register the plugin
As part of creating the server, register the hapi-connect plugin.
import connect from '@defra/hapi-connect'
await server.register({
plugin: connect,
options: {
path: '/my-route',
middleware: [myMiddleware]
}
})