Skip to content

Commit

Permalink
node-red node works
Browse files Browse the repository at this point in the history
  • Loading branch information
AlonsoDRDLV committed Jul 24, 2023
1 parent 2914664 commit 5410645
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions bindings/nodejs/nodered/hvps-nodered.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
import { ExecutionContext } from "hvps";
hvps = require('hvps')

module.exports = function (RED) {
function HVPS(config) {
RED.nodes.createNode(this, config);
const node = this;
context = new hvps.ExecutionContext("/usr/bin/python");
node.on('input', function (msg) {
msg.payload = msg.payload.toLowerCase();
msg.payload = context.run(msg.payload);
node.send(msg);
});
}
Expand Down

0 comments on commit 5410645

Please sign in to comment.