Skip to content

Commit

Permalink
fix(web): set default nodejs version 8 for web version
Browse files Browse the repository at this point in the history
  • Loading branch information
DEgITx committed Jul 17, 2018
1 parent 5cbb5c6 commit 743b27b
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/background/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,13 @@ console.log('Total memory:', (os.totalmem() / (1024 * 1024)).toFixed(2), 'MB')
console.log('Free memory:', (os.freemem() / (1024 * 1024)).toFixed(2), 'MB')
console.log('NodeJS:', process.version)

const majorVersion = /v?([0-9]+)\.?([0-9]+)?\.?([0-9]+)?\.?([0-9]+)?/.exec(process.version)[1]
if(majorVersion < 8)
{
console.log('Minumum Node.JS version >= 8.0.0, please update and try again')
process.exit(1);
}

app.use(express.static('web'));

const socketMessages = {}
Expand Down

0 comments on commit 743b27b

Please sign in to comment.