Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 400,000 packages pre-installed, including node-red-contrib-func-exec with all npm packages installed. Try it out:

node-red-contrib-func-exec lists no main file and has no index.js, so it can't be directly required. If this is a mistake, please let us know. It may however contain internal files that you can require manually:

// require("node-red-contrib-func-exec/[??]")

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

node-red-contrib-func-exec v0.1.11

The executable context node which allows you to execute your functions in javascript block.


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"]]}]


RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free