Skip to content
This repository has been archived by the owner on Feb 5, 2022. It is now read-only.

Commit

Permalink
Have index.js check node version is >= 4 before continuing, for codec…
Browse files Browse the repository at this point in the history
  • Loading branch information
sderickson committed Mar 17, 2016
1 parent 9a36267 commit 8e6faaf
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
@@ -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');
Expand Down

0 comments on commit 8e6faaf

Please sign in to comment.