Hello,
I want to create a function with 0 input and 1 output. I've done the HTML code and the JS code, the code runs fine but does not go to the next node.
Can you help me solve my problem
HTML
<!-- *************** FONCTION test MAIL *************** -->
<script type="text/javascript">
RED.nodes.registerType('ews-monTest', {
category: 'EWS',
color: '#2684ff',
defaults: {
name: {
value: ""
}
},
inputs: 0,
outputs: 1,
icon: "ews-icon.png",
label: function() {
return this.name || "ews-monTest";
}
});
</script>
<script type="text/x-red" data-template-name="ews-monTest">
<div class="form-row">
<label for="node-input-name"><i class="icon-tag"></i> Name</label>
<input type="text" id="node-input-name" placeholder="Name"/>
</div>
</script>
<script type="text/x-red" data-help-name="ews-monTest">
<p>Mon test</p>
</script>
JS
module.exports = function(RED) {
"use strict";
/************************************************************************************
* ewsMonTest
************************************************************************************/
function ewsMonTest(config) {
console.log("ewsMonTest => ---------------- TEST -------------------");
RED.nodes.createNode(this,config);
var node = this;
var msg = {"payload":"bla"}
node.send(msg);
node.send(msg);
}
RED.nodes.registerType("ews-monTest", ewsMonTest);
}
RESULT
14 Sep 13:54:11 - [info] Starting flows
ewsMonTest => ---------------- TEST -------------------
14 Sep 13:54:12 - [info] Started flows
cordially