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

Fix paths to red to use env variable

This commit is contained in:
Dave C-J 2013-11-04 08:45:37 +00:00
parent 5e67f41114
commit ab168fe26f
2 changed files with 7 additions and 7 deletions

View File

@ -14,15 +14,15 @@
* limitations under the License. * limitations under the License.
**/ **/
var RED = require("../../red/red"); var RED = require(process.env.NODE_RED_HOME+"/red/red");
var badwords = require('badwords'); var badwords = require('badwords');
function BadwordsNode(n) { function BadwordsNode(n) {
RED.nodes.createNode(this,n); RED.nodes.createNode(this,n);
var node = this; var node = this;
this.on("input", function(msg) { this.on("input", function(msg) {
if (badwords.ok(msg.payload)) { node.send(msg); } if (badwords.ok(msg.payload)) { node.send(msg); }
}); });
} }
RED.nodes.registerType("badwords",BadwordsNode); RED.nodes.registerType("badwords",BadwordsNode);

View File

@ -14,7 +14,7 @@
* limitations under the License. * limitations under the License.
**/ **/
var RED = require("../../red/red"); var RED = require(process.env.NODE_RED_HOME+"/red/red");
var settings = RED.settings; var settings = RED.settings;
var util = require("util"); var util = require("util");
var fs = require('fs'); var fs = require('fs');