Check node version

This commit is contained in:
Daniel García Aubert 2017-03-24 17:28:23 +01:00
parent a7b0618f91
commit 213a3e297c
2 changed files with 10 additions and 2 deletions

10
app.js
View File

@ -2,8 +2,16 @@ var http = require('http');
var https = require('https');
var path = require('path');
var fs = require('fs');
var _ = require('underscore');
var semver = require('semver');
var ver = process.versions.node;
ver = ver.split('-')[0]; // explode and truncate tag from version #511
if (!semver.satisfies(ver, '>6.9.0')) {
console.log('Node version ' + ver + ' is not supported, please use Node.js 6.9 or higher.');
process.exit(1);
}
// jshint undef:false
var log = console.log.bind(console);

View File

@ -35,6 +35,7 @@
"queue-async": "~1.0.7",
"redis-mpool": "0.4.1",
"request": "~2.79.0",
"semver": "~5.3.0",
"step": "~0.0.6",
"step-profiler": "~0.3.0",
"turbo-carto": "0.19.0",
@ -48,7 +49,6 @@
"mocha": "~1.21.4",
"nock": "~2.11.0",
"redis": "~0.12.1",
"semver": "~1.1.4",
"strftime": "~0.8.2"
},
"scripts": {