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

update sample to use environment variable for path to RED.

This commit is contained in:
Dave C-J 2013-10-28 09:59:36 +00:00
parent c193779f67
commit deef63334f

View File

@ -19,7 +19,7 @@
// Sample Node-RED node file // Sample Node-RED node file
// Require main module // 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 // The main node definition - most things happen in here
function SampleNode(n) { function SampleNode(n) {
@ -41,10 +41,10 @@ function SampleNode(n) {
this.send(msg); this.send(msg);
this.on("close", function() { this.on("close", function() {
// Called when the node is shutdown - eg on redeploy. // Called when the node is shutdown - eg on redeploy.
// Allows ports to be closed, connections dropped etc. // Allows ports to be closed, connections dropped etc.
// eg: this.client.disconnect(); // eg: this.client.disconnect();
}); });
} }
// Register the node by name. This must be called before overriding any of the // Register the node by name. This must be called before overriding any of the