pvnp

1.0.1 • Public • Published

PvNP

An express middleware meant to detect if P v NP has been solved. I made it in joking fear of the inevitable solving of the Millennium Prize Problem P vs NP. Many fear that the solution to P v NP will bring the end to modern cryptography so you can use this to shutdown your server to secure vital information.

Installation

npm i PvNP

Usage

const express = require('express');
const PvNP = require('PvNP');
 
var app = express();
 
// Normal usage
app.use(PvNP.middleware());
 
// Usage with custom message and status
app.use(PvNP.middleware("Custom denial of service message", 500 /*Custom status code*/));
 
// Package will emit an event when PvNP gets solved
PvNP.on('solved', function() {
    console.log("NOOOOOPE, its not safe anymore");
    process.exit(1);
});

Dependencies (2)

Dev Dependencies (0)

    Package Sidebar

    Install

    npm i pvnp

    Weekly Downloads

    3

    Version

    1.0.1

    License

    MIT

    Unpacked Size

    26.4 kB

    Total Files

    5

    Last publish

    Collaborators

    • danhab99