1.0.0 • Published 7 years ago
elasticsearch-hapi v1.0.0
Hapi plugin for Elastic Search · · · · ·
Originally forked from RapidApps/elasticsearch-hapi-plugin
Provides a central Elastic Search client for your other hapi plugins and server to use.
Features
- Elastic Search logs through your hapi server
- Elastic Search connection pool for entire server
Install
npm i -S elasticsearch-hapi
Usage example
See the Elastic Search configuration documentation for all the configuration options.
import esHapi from 'elasticsearch-hapi'
import Hapi from 'hapi'
const server = new Hapi.Server()
server.register({
plugin: esHapi,
options: {
host: 'http://localhost:9200'
}
}, (err) => {
if (err) {
throw err
}
server.start()
})