Skip to content

Commit

Permalink
feat: warn and exit on unsupported node version
Browse files Browse the repository at this point in the history
  • Loading branch information
NGPixel authored May 12, 2023
1 parent fd00272 commit e1d282a
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions server/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,19 @@
const path = require('path')
const { nanoid } = require('nanoid')
const { DateTime } = require('luxon')
const { gte } = require('semver')

// ----------------------------------------
// Check Node.js version
// ----------------------------------------
if (gte(process.version, '18.0.0')) {
console.error('You\'re using an unsupported Node.js version. Please read the requirements.')
process.exit(1)
}

// ----------------------------------------
// Init WIKI instance
// ----------------------------------------

let WIKI = {
IS_DEBUG: process.env.NODE_ENV === 'development',
Expand Down

0 comments on commit e1d282a

Please sign in to comment.