// Check all custom variables are in the variables file function check_variables() { const constants_to_check = [ "NODE_ENV", "PORT", "DB_ADDRESS", "PW", "USER" ]; let have_error = false; for (let value of constants_to_check) { if (!process.env[value]) { have_error = true; console.error( colors.bgRed.white(`${value} constant value missing from variables.env`) ); } } if (have_error) { throw new Error("Missing Constant value in variables.env"); } }
error: function(args) { for (var i = 0; i < args.length; i++) { if (typeof args[i] === 'string') { args[i] = colors.bgRed.white(args[i].white); } } }