mirror of
https://github.com/Hessenuk/DiscordTickets.git
synced 2024-11-17 17:23:08 +02:00
env
This commit is contained in:
parent
e723ce76f5
commit
c2fe7f73d1
@ -21,6 +21,9 @@
|
|||||||
* @license GNU-GPLv3
|
* @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 pkg = require('../package.json');
|
||||||
const fs = require('fs');
|
const fs = require('fs');
|
||||||
const semver = require('semver');
|
const semver = require('semver');
|
||||||
@ -31,9 +34,6 @@ const YAML = require('yaml');
|
|||||||
const Client = require('./client');
|
const Client = require('./client');
|
||||||
const http = require('./http');
|
const http = require('./http');
|
||||||
|
|
||||||
process.env.NODE_ENV ??= 'development'; // make sure NODE_ENV is set
|
|
||||||
require('dotenv').config(); // load env file
|
|
||||||
|
|
||||||
// check node version
|
// check node version
|
||||||
if (!semver.satisfies(process.versions.node, pkg.engines.node)) {
|
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}".`));
|
console.log('\x07' + colours.redBright(`Error: Your current Node.js version, ${process.versions.node}, does not meet the requirement "${pkg.engines.node}".`));
|
||||||
|
Loading…
Reference in New Issue
Block a user