node-red-contrib-func-exec

0.1.11 • Public • Published

node-red-contrib-func-exec

The node-red function with child_process executable object in the sandbox context.

npm version

Example Flow

[{"id":"18fa45e.dd993ba","type":"debug","z":"ce212a3e.f97778","name":"","active":true,"console":"false","complete":"false","x":560,"y":380,"wires":[]},{"id":"d649825e.ab13d","type":"inject","z":"ce212a3e.f97778","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"x":160,"y":300,"wires":[["3197e4b9.85addc"]]},{"id":"3197e4b9.85addc","type":"func-exec","z":"ce212a3e.f97778","name":"","func":"var exec = child_process.exec('ls -la', (error, stdout, stderr) => { \n    if (error) { \n    console.error(`exec error: ${error}`); \n    return; \n    } \n    console.log(`stdout: ${stdout}`); \n    console.log(`stderr: ${stderr}`); \n    msg.payload = stdout;\n    callback(msg);\n}); ","outputs":1,"noerr":0,"x":360,"y":340,"wires":[["18fa45e.dd993ba"]]}]

Dependencies (1)

Dev Dependencies (0)

    Package Sidebar

    Install

    npm i node-red-contrib-func-exec

    Weekly Downloads

    16

    Version

    0.1.11

    License

    Apache-2.0

    Unpacked Size

    22.3 kB

    Total Files

    6

    Last publish

    Collaborators

    • cuongquay