UNPKG

hapi-pulse

Version:

hapi plugin that gracefully stops the hapi server on SIGINT

19 lines (14 loc) 375 B
'use strict' const Joi = require('joi') const Schema = require('./options-schema') const LifecycleHandler = require('./lifecycle-handler') function register (server, options) { Joi.assert(options, Schema) const handler = new LifecycleHandler(server, options) handler.addListeners() } exports.plugin = { register, once: true, pkg: require('../package.json') }