Hi all,
I'm trying to expose a REST endpoint inside a node.
I would like to use a node config property inside of it (I don't want to fire the flow).
This is the code:
function MyNode(config) {
RED.nodes.createNode(this, config);
this.myproperty = config.myproperty;
node.on('input', function (msg) {
// ...
node.send(msg);
});
}
RED.nodes.registerType("myNode", MyNode);
RED.httpAdmin.get("/myendpoint", function (req, res) {
// how to read node.myproperty?
});