UNPKG

kibana-123

Version:

Kibana is an open source (Apache Licensed), browser based analytics and search dashboard for Elasticsearch. Kibana is a snap to setup and start using. Kibana strives to be easy to get started with, while also being flexible and powerful, just like Elastic

26 lines (20 loc) 584 B
import Boom from 'boom'; import { Server } from 'hapi'; import { fromNode } from 'bluebird'; import registerHapiPlugins from '../../server/http/register_hapi_plugins'; module.exports = class LazyServer { constructor(host, port, optimizer) { this.optimizer = optimizer; this.server = new Server(); registerHapiPlugins(null, this.server); this.server.connection({ host: host, port: port }); } async init() { await this.optimizer.init(); this.optimizer.bindToServer(this.server); await fromNode(cb => this.server.start(cb)); } };