From f97a7ab61c68d39b3deb8155cd46a04f2e862703 Mon Sep 17 00:00:00 2001 From: Isaac Date: Fri, 24 Feb 2023 00:18:38 +0000 Subject: [PATCH] fix: default to `production` --- scripts/preinstall.js | 1 + src/index.js | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/preinstall.js b/scripts/preinstall.js index 783c47d..97931c4 100644 --- a/scripts/preinstall.js +++ b/scripts/preinstall.js @@ -22,6 +22,7 @@ const env = { HTTP_HOST: '0.0.0.0', HTTP_PORT: 8080, HTTP_TRUST_PROXY: false, + NODE_ENV: 'production', // not bot-specific OVERRIDE_ARCHIVE: '', PUBLIC_BOT: false, PUBLISH_COMMANDS: false, diff --git a/src/index.js b/src/index.js index 79a8a45..25d507f 100644 --- a/src/index.js +++ b/src/index.js @@ -37,7 +37,7 @@ if (!semver.satisfies(process.versions.node, pkg.engines.node)) { } // this could be done first, but then there would be no banner :( -process.env.NODE_ENV ??= 'development'; // make sure NODE_ENV is set +process.env.NODE_ENV ??= 'production'; // make sure NODE_ENV is set require('./env').load(); // load and check environment variables const fs = require('fs');