1
0
mirror of https://github.com/node-red/node-red-nodes.git synced 2023-10-10 13:36:58 +02:00

Nodes must not require(settings) themselves

They should access settings via RED.settings
This commit is contained in:
Nick O'Leary 2014-01-13 10:59:12 +00:00
parent 0e955ea120
commit 97dbe8da0c

View File

@ -24,7 +24,7 @@ var util = require('util');
// module.exports = {prowlkey:'My-API-KEY'}
try {
var pushkey = require(process.env.NODE_RED_HOME+"/settings").prowl || require(process.env.NODE_RED_HOME+"/../pushkey.js");
var pushkey = RED.settings.prowl || require(process.env.NODE_RED_HOME+"/../pushkey.js");
}
catch(err) {
util.log("[57-prowl.js] Error: Failed to load Prowl credentials");