mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2025-02-17 00:40:56 -05:00
Have index.js check node version is >= 4 before continuing, for #3495
This commit is contained in:
parent
9a36267ba7
commit
8e6faaf66c
1 changed files with 8 additions and 0 deletions
8
index.js
8
index.js
|
@ -1,3 +1,11 @@
|
|||
var majorVersion = parseInt(process.versions.node.split('.')[0]);
|
||||
if (majorVersion < 4) {
|
||||
console.error('Server requires Node v4 or higher. Your version:', process.version);
|
||||
process.exit(1);
|
||||
}
|
||||
if (majorVersion === 4) {
|
||||
console.warn('WARNING: You are using Node v4. Please upgrade to Node v5. Your version:', process.versions.node);
|
||||
}
|
||||
require('coffee-script');
|
||||
require('coffee-script/register');
|
||||
var server = require('./server');
|
||||
|
|
Loading…
Reference in a new issue