From c2fe7f73d14f738b2e202c572a67f352d93cbc02 Mon Sep 17 00:00:00 2001 From: Isaac Date: Wed, 5 Oct 2022 00:35:54 +0100 Subject: [PATCH] env --- src/index.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/index.js b/src/index.js index 9a71ee7..82a159c 100644 --- a/src/index.js +++ b/src/index.js @@ -21,6 +21,9 @@ * @license GNU-GPLv3 */ +process.env.NODE_ENV ??= 'development'; // make sure NODE_ENV is set +require('dotenv').config(); // load env file + const pkg = require('../package.json'); const fs = require('fs'); const semver = require('semver'); @@ -31,9 +34,6 @@ const YAML = require('yaml'); const Client = require('./client'); const http = require('./http'); -process.env.NODE_ENV ??= 'development'; // make sure NODE_ENV is set -require('dotenv').config(); // load env file - // check node version if (!semver.satisfies(process.versions.node, pkg.engines.node)) { console.log('\x07' + colours.redBright(`Error: Your current Node.js version, ${process.versions.node}, does not meet the requirement "${pkg.engines.node}".`));