New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

express-boom

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

express-boom

Boom response objects in Express

latest
Source
npmnpm
Version
3.0.0
Version published
Weekly downloads
3.1K
15.96%
Maintainers
1
Weekly downloads
 
Created
Source

express-boom

Boom response objects in Express.

Install

npm install express-boom --save

Usage

var express = require('express');
var boom = require('express-boom');

var app = express();

app.use(boom());

app.use(function (req, res) {
  res.boom.notFound(); // Responds with a 404 status code
});

app.use(function (req, res) {
  // some validation check fail and returns an object : reasons
  
  res.boom.badRequest("Validation didn't suceed", reasons); // Responds Boom message + reasons object
});

app.listen(4444);

For a complete list of methods, see the Boom docs

Keywords

Hapi

FAQs

Package last updated on 08 Mar 2019

Did you know?

Socket

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.

Install

Related posts