stop logging dev/fresh mode

pull/1/head
ansuz 4 years ago
parent f2ec9cbe33
commit adb988058d

@ -12,7 +12,6 @@ const Quota = require("./commands/quota");
const Util = require("./common-util"); const Util = require("./common-util");
module.exports.create = function (config) { module.exports.create = function (config) {
// mode can be FRESH (default), DEV, or PACKAGE
const Env = { const Env = {
FRESH_KEY: '', FRESH_KEY: '',
@ -93,23 +92,25 @@ module.exports.create = function (config) {
disableIntegratedTasks: config.disableIntegratedTasks || false, disableIntegratedTasks: config.disableIntegratedTasks || false,
disableIntegratedEviction: config.disableIntegratedEviction || false, disableIntegratedEviction: config.disableIntegratedEviction || false,
lastEviction: +new Date(), lastEviction: +new Date(),
knownActiveAccounts: 0,
}; };
(function () { (function () {
// mode can be FRESH (default), DEV, or PACKAGE
if (process.env.PACKAGE) { if (process.env.PACKAGE) {
// `PACKAGE=1 node server` uses the version string from package.json as the cache string // `PACKAGE=1 node server` uses the version string from package.json as the cache string
console.log("PACKAGE MODE ENABLED"); //console.log("PACKAGE MODE ENABLED");
Env.FRESH_MODE = false; Env.FRESH_MODE = false;
Env.DEV_MODE = false; Env.DEV_MODE = false;
} else if (process.env.DEV) { } else if (process.env.DEV) {
// `DEV=1 node server` will use a random cache string on every page reload // `DEV=1 node server` will use a random cache string on every page reload
console.log("DEV MODE ENABLED"); //console.log("DEV MODE ENABLED");
Env.FRESH_MODE = false; Env.FRESH_MODE = false;
Env.DEV_MODE = true; Env.DEV_MODE = true;
} else { } else {
// `FRESH=1 node server` will set a random cache string when the server is launched // `FRESH=1 node server` will set a random cache string when the server is launched
// and use it for the process lifetime or until it is reset from the admin panel // and use it for the process lifetime or until it is reset from the admin panel
console.log("FRESH MODE ENABLED"); //console.log("FRESH MODE ENABLED");
Env.FRESH_KEY = +new Date(); Env.FRESH_KEY = +new Date();
} }
}()); }());

Loading…
Cancel
Save