Skip to content

Commit

Permalink
fix string version number issue
Browse files Browse the repository at this point in the history
  • Loading branch information
wesbos committed May 5, 2017
1 parent f77d0bc commit 82f746b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions starter-files/start.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
const mongoose = require('mongoose');

// Make sure we are running node 7.6
if (parseFloat(process.versions.node) < 7.6) {
// Make sure we are running node 7.6+
const [major, minor] = process.versions.node.split('.').map(parseFloat);
if (major <= 7 && minor <= 5) {
console.log('🛑 🌮 🐶 💪 💩\nHey You! \n\t ya you! \n\t\tBuster! \n\tYou\'re on an older version of node that doesn\'t support the latest and greatest things we are learning (Async + Await)! Please go to nodejs.org and download version 7.6 or greater. 👌\n ');
process.exit();
}
Expand Down

0 comments on commit 82f746b

Please sign in to comment.