i made one custom node named as "PLC", if after deploying flows there are 5 nodes of PLC is there on flows
In JS file of PLC node i want to know what is number of current node out of 5
Why?
When inside the node's code, there are several sections.
// This part is common - all instances share this but nothing here is
// shared with Node-RED by default
module.exports = fuction(RED) {
// This is also common to all instances
RED.nodes.registerType('nodeName', function(config) {
// Everything in here is specific to a single instance.
// you don't need to know the ID of the instance
// just remember that every variable you create here is actually created once
// per instance and they will be completely independent from any other instance
})
// and here we are back to code that is common across all instances
}