Meaning of globals.get("mysql");

Hi

Found that @HarryPottar uses globals.get("mysql"); on function node. MySQL Node Odd ER_PARSE_ERROR 5 out of 38,000 records - #10 by HarryPottar
Explanation is " loading mysql node globally " ,but what that means and how it can be used? Where it is set?

Hi @santtu1980

With older versions of Node-RED, the only way to add additional npm modules to the Function node was to load them via your settings file and put them into global context.

This is described in the Function node docs here: Writing Functions : Node-RED

Since Node-RED 1.3, it has also been possible to add additional modules to individual nodes via the editor, and not have to edit your settings file. That is also described at the link above.

Thanks for the informative answer!

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