
Product
Announcing Socket Fix 2.0
Socket Fix 2.0 brings targeted CVE remediation, smarter upgrade planning, and broader ecosystem support to help developers get to zero alerts.
Opinionated Boom-based wrapper for asynchronous middleware (or handler) for Express, Connect, router, etc.
npm i --save boomware
const boom = require('boom')
const boomware = require('boomware')
const express = require('express')
const app = express()
// Middleware can return a Promise (but it doesn't have to)
app.get('/async', boomware(async (req, res) => {
if (Math.random() > 0.75) throw('Unexpected error!')
if (Math.random() > 0.5) throw boom.serverUnavailable()
res.send('OK!')
}))
app.use((err, req, res, next) => {
console.error(err)
res.status(err.output.statusCode).json(err.output.payload)
})
app.listen(3000)
boomware(fn)Returns a middleware function that catches a thrown error, wraps it
in an Boom.badImplementation
if it's not already a Boom error, and passes it to the next()
function. boomware handles the case whenfn return Promise, and the
case when fn does not return a Promise.
1.1.3 (2020-01-28)
<a name="1.1.2"></a>
FAQs
Opinionated Boom-based wrapper for asynchronous middleware
We found that boomware demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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.

Product
Socket Fix 2.0 brings targeted CVE remediation, smarter upgrade planning, and broader ecosystem support to help developers get to zero alerts.

Security News
Socket CEO Feross Aboukhadijeh joins Risky Business Weekly to unpack recent npm phishing attacks, their limited impact, and the risks if attackers get smarter.

Product
Socket’s new Tier 1 Reachability filters out up to 80% of irrelevant CVEs, so security teams can focus on the vulnerabilities that matter.