Hi all,
Does anyone know of a way to get hold of the Node-RED version string from within a custom node? e.g. something on the RED object or an API call?
I want to pass it through to an API that uibuilder sets up that displays detailed information about the configuration of the Node.
Note on Slack
PS: I asked this on Slack earlier but looks like not many people online so I added a note to say that answers should come here instead - it is rather easy to lose threads on Slack.
https://node-red.slack.com/archives/C03M2TAQ8/p1569698391387600
If thought it was in RED.settings.version - but not sure why a node would need to know it per se - You can restrict if a node gets installed to a version of Node-RED etc via its package.json.
1 Like
Thanks Dave, that does it.
Well, I don't need it, but it is handy to have all the information in a single place:
The above is a small part of the updated uibindex
page from uibuilder - it tells you everything that is going on. All of the URLs available, all of the packages and their main entry points and help URL's, configuration of ExpressJS, configuration of uibuilder itself and some other useful bits.
The minimum version is pulled from the package.json of course.
2 Likes