Catalog npm
Back to packageRELEASE DETAILS

2.0.0

npm

200-ok-boomer

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

silly
Published17 Feb 2020
Direct dependencies9
Transitive dependenciesNot calculated

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.

Declared dependencies 9

Native requirements
9 direct targetsNot calculated transitive count
Package / targetRequirementRelationship
codecov
Environment
{
  "local_name": "codecov",
  "alias": false,
  "peer_metadata": null
}
^3.6.1runtime
@types/express
Environment
{
  "local_name": "@types/express",
  "alias": false,
  "peer_metadata": null
}
^4.17.2development
@types/jest
Environment
{
  "local_name": "@types/jest",
  "alias": false,
  "peer_metadata": null
}
^25.1.2development
@types/node-fetch
Environment
{
  "local_name": "@types/node-fetch",
  "alias": false,
  "peer_metadata": null
}
^2.5.4development
express
Environment
{
  "local_name": "express",
  "alias": false,
  "peer_metadata": null
}
^4.17.1development
jest
Environment
{
  "local_name": "jest",
  "alias": false,
  "peer_metadata": null
}
^25.1.0development
node-fetch
Environment
{
  "local_name": "node-fetch",
  "alias": false,
  "peer_metadata": null
}
^2.6.0development
ts-jest
Environment
{
  "local_name": "ts-jest",
  "alias": false,
  "peer_metadata": null
}
^25.2.0development
typescript
Environment
{
  "local_name": "typescript",
  "alias": false,
  "peer_metadata": null
}
^3.7.5development

Distribution files

1 collected
Distribution 1

Source distribution

Source file
Checksums from source
{
  "integrity": "sha512-I/7+iYFN5CE1yl65Qx9CTt1URiiHF/GZm5jlL1rYTFHyNwkcX1BQUpJOHkE8N/359pEVWE9TcoGV1i6yqzZBMQ==",
  "shasum": "b2b771e6d06e176193ff7aa753a13134fc4714e0",
  "tarball": "https://registry.npmjs.org/200-ok-boomer/-/200-ok-boomer-2.0.0.tgz",
  "fileCount": 27,
  "unpackedSize": 36298,
  "npm-signature": "-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeSgdDCRA9TVsSAnZWagAAqogQAIWNuE5gw2t9p2rt9EoI\n4R8E3+o+w8CPYAFFu8hq1hXOUmmOlAQGUcXuZjhvO9OGycwEE+gagAEjRxIZ\njEroP7vMQE8fpufZyH2iX6Qqa7IvY2RK2LgSCd8rD333huZIY52R3tJY8XNc\n8Cs7mp7zKPW4Zm+TUEShPikaCYch4ixpwFLsO9PZhHRrbmBVwanFxXszXfLU\neaDMKU8ES3/ahpfFT4vXyqVx9ivcXzPbTBWMjeGfeHRRM973wjvdyFmKR2AH\nqZ5LGDllij446T7599MMwxgbOPwa1822Y3iWrFAE4gv/wXFRE3vI5NXLdaRh\nuWeKIZBZQgS6d+YKnOfsGo/CzScu0Vh/dEH9XTKexMBc/5u/5xPOioaiWwiy\nSngGdGxtJrCtb7GiPRMA6lKNG22WU8eay3TCyMDLHUWVOjJuTdBVncYdMleo\n/RweM29DMwqLzS47iWaTZTlxSTqUQwDuktQQt79SmJPIeMcQqcgpD7TmRHwW\nRwF2n6fM3zWRWufP7vIg7r51RNuUPSbI6/R4QD/TaVM3pdbNwhOQc1dklEVY\n5csKmN9dkjGRarDI9Fj7NDpMbrKnEMcelYCc3CSTscwf4owyptJpKvvjtaiL\nYQEHpw2PRUcxzqRDEuCt+zSENmFwrmuf/+vkojJ00M3RW3zmYHWIoIXMYHjQ\n3Kie\r\n=lTgZ\r\n-----END PGP SIGNATURE-----\r\n",
  "signatures": [
    {
      "keyid": "SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA",
      "sig": "MEUCIQCur3klhLyjuyyhX4eHtpm3RMa5D3GrC0diSY2f/7fglAIgaYuJJHt3wtS7/TFmr5Ro8br1nXQ5T70suViS84deN9Q="
    }
  ]
}

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_version:8a76c9968dfdc371d9b9f6b363ce0446082f8a9ea6bbd75085b6914eae07e47a

Other collected versions

2.1.023 Jun1.0.123 Dec1.0.023 DecView all collected versions →