Server composer for hapi.js
Server composer for hapi.js.
Lead Maintainer - Chris Rempel
Glue exports a single function
compose accepting a JSON
manifest file specifying the Hapi server options, connections and plugins. Glue primarily works in synergy with Rejoice, but can be integrated directly into any Hapi application loader.
compose(manifest, [options], callback)
manifest- an object having:
server.register(plugins, [options], callback). Each key is the
nameof the plugin to load and register and the value is one of:
true. Each object can have:
options- an object to use as the plugin options which get passed to the plugin's registration function when called.
options- an object having
require. Used in
server- is the server object returned from
server- is the server object with all connections selected.
callback- the callback function with signature
function (err, server)where:
err- the error response if a failure occurred, otherwise
server- the server object. Call
server.start()to actually start the server.