Catalog npm
PACKAGE EXPLORERView in registry

200-ok-boomer

npm

Middleware to convert "200 OK" into "200 OK Boomer"

silly
Versions collected4
Direct dependencies9From release 2.1.0
Last observed20 Oct, 18:49 UTC

README

Current package documentation

npm Codecov

200-ok-boomer

Middleware to convert "200 OK" into "200 OK Boomer"

This project shouldn't be taken seriously or in any way as a political statement. It only provides a single function okBoomer which has the signature of Express Middleware function okBoomer(req, res, next)

This middleware overwrites the send method of the request to transmit a statusMessage of "OK Boomer" along as long as statusCode is 200. That's it, that's all it does.

In order to work properly this middleware should be registered before request handlers or anything else which can transmit headers to clients since it replaces methods on the Response object at the time it is invoked as middleware.

Usage

In the case of an Express app, simply require 200-ok-boomer and apply as middleware e.g.

const express = require('express');
const okBoomer = require('200-ok-boomer');

const app = express();
app.use(okBoomer());
app.get('/', (req, res) => res.sendStatus(200));
server = app.listen(5000);
$curl -I localhost:5000
HTTP/1.1 200 OK Boomer

Telemetry

As of version 2.0.0, 200-ok-boomer will by default emit simple metrics (a count of 200 OK Boomer responses). This will be done by periodically (once per minute) calling a metrics endpoint with an aggregated count.

If this behavior is undesirable, please pass a configuration object specifying "collectMetrics" to be false:

app.use(okBoomer()); // Will collect and transmit metrics
app.use(okBoomer({collectMetrics: false})); // Will NOT collect and transmit metrics

Downloads & popularity

Awaiting observations

No metric observations yet

Download counts and popularity will appear here as the collector receives them.

Versions 4

Collected releases
VersionPublishedDirect dependenciesOpen version
2.1.0Registry latest23 Jun 20209
2.0.017 Feb 20209
1.0.123 Dec 20193
1.0.023 Dec 20193

Package advisories

0
No matching advisories collected

This describes our collected data; it is not a security assessment.

Repository

PENDING
mbpreble/200-ok-boomer

Shared repository data · GitHub

License detected in repository
Not collected

Metadata history

Meaningful changes
Current collected state Current

Observed since 20 Oct, 18:49 UTC

No superseded metadata states collected. Unchanged observations do not create new revisions.

Record identity

package:16768978062f50a62d47b005a5b5048fe4acfc752b7df2cdcb7c8b88484ff2aa