pvnp
v1.0.1
Published
An express middleware meant to detect if P v NP has been solved
Downloads
18
Maintainers
Readme
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);
});