Fetch run-time environment (version) details

Hi all,
I'm creating some automated test cases for my subflows, What I'm hoping to do is programmatically capture some details about the test environment (the Node-red, node.js versions etc.).
Has anyone had experience with this? Is there a RED.util.getSetting( node, "something") I can call in a function block that will fetch some of these values?
Thanks

These may help
Exec system command for node js version.
https://nodered.org/docs/api/modules/v/1.3/@node-red_util_exec.html

Get version
https://nodered.org/docs/api/modules/v/1.3/@node-red_runtime.html#.version

In runtime code, try RED.settings - All of Node-RED's settings should be available by name, for example RED.settings.context.stores retrieves all of the defined stores.

There is also RED.settings.get('propname') - I can't quite remember what the recommendation is about using the getter rather than accessing directly. It is probably buried in the docs somewhere.

Should work in the Editor as well. Not sure whether it works in a function node though.

Looks good, will give it a try.
Thanks

Good solution for a custom node I think.

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.