From deef63334f82773adc7303573731992246f10e2b Mon Sep 17 00:00:00 2001 From: Dave C-J Date: Mon, 28 Oct 2013 09:59:36 +0000 Subject: [PATCH] update sample to use environment variable for path to RED. --- nodes/99-sample.js.demo | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/nodes/99-sample.js.demo b/nodes/99-sample.js.demo index 5db5b141d..c591185a0 100644 --- a/nodes/99-sample.js.demo +++ b/nodes/99-sample.js.demo @@ -19,7 +19,7 @@ // Sample Node-RED node file // Require main module -var RED = require("../../red/red"); +var RED = require(process.env.NODE_RED_HOME+"/red/red"); // The main node definition - most things happen in here function SampleNode(n) { @@ -41,10 +41,10 @@ function SampleNode(n) { this.send(msg); this.on("close", function() { - // Called when the node is shutdown - eg on redeploy. - // Allows ports to be closed, connections dropped etc. - // eg: this.client.disconnect(); - }); + // Called when the node is shutdown - eg on redeploy. + // Allows ports to be closed, connections dropped etc. + // eg: this.client.disconnect(); + }); } // Register the node by name. This must be called before overriding any of the