Engine Asserts
Simple nodejs module that allow you to verify if enviroment version of node/mongodb matches version specified in your package.json/.nvmrc
Installation
As expected, you can install via npm:
$ npm install engine-asserts
Example Usage
insert following code in your package.json .nvmrc
...
{
"engines": {
"node": "1.0.0",
"mongodb": "3.2.1"
}
}
...
5.5.0
You can then use in your Node apps:
var engineAsserts = require('engine-asserts')(cfg);
engineAsserts.checkNodeVersion(justWarn);
engineAsserts.checkMongoVersion(justWarn);
You can run tests:
$ npm run test