Security News
Node.js EOL Versions CVE Dubbed the "Worst CVE of the Year" by Security Experts
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
#glue
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:
new Server([options])
server.connection([options])
server.register(plugins, [options], callback)
. Note that when using an object, the order of registration is not garanteed, while with the array it is. Still when you want absolutely garantee the order of plugin loading use the hapi built in way, server.dependecy(dependencies, [after])
. Each key is the name
of the plugin to load and register and the value is one of:
attributes.multiple
is true
. Each object can have:
server.register
optionsoptions
- 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.cache
and plugins[name]
function (server, next)
where:
server
- is the server object returned from new Server(options)
.next
- the callback function the method must call to return control over to gluefunction (server, next)
where:
server
- is the server object with all connections selected.next
- the callback function the method must call to return control over to gluecallback
- the callback function with signature function (err, server)
where:
err
- the error response if a failure occurred, otherwise null
.server
- the server object. Call server.start()
to actually start the server.You create a manifest and then you can use the manifest for creating the new server:
var Glue = require('glue');
var manifest = {
server: {
debug: {
request: ['error']
}
},
connections: [{
port: 8080
}],
plugins: {
'./routes/index': {}
}
};
var options = {
relativeTo: __dirname
};
Glue.compose(manifest, options, function (err, server) {
if (err) {
throw err;
}
server.start(function () {
console.log('woot');
});
});
FAQs
Server composer for hapi.js
The npm package glue receives a total of 660 weekly downloads. As such, glue popularity was classified as not popular.
We found that glue demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 5 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
Security News
cURL and Go security teams are publicly rejecting CVSS as flawed for assessing vulnerabilities and are calling for more accurate, context-aware approaches.
Security News
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.