Skip to content

danhab99/PvNP

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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);
});

About

An express middleware meant to detect if P v NP has been solved

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published