Using npm modules in a function node

32 views
Skip to first unread message

Giles Roadnight

unread,
Sep 30, 2016, 9:26:44 AM9/30/16
to Node-RED
Hi All
I want to use this crypto library in a function node:


is there any way I can require it and use it in a function node or do I have to turn it into a node?

Thanks

Nicholas O'Leary

unread,
Sep 30, 2016, 9:27:56 AM9/30/16
to Node-RED Mailing List
Hi,

please see the example of using the 'os' module via functionGlobalContext in your settings file: http://nodered.org/docs/writing-functions#global-context

Nick

--
http://nodered.org
 
Join us on Slack to continue the conversation: http://nodered.org/slack
---
You received this message because you are subscribed to the Google Groups "Node-RED" group.
To unsubscribe from this group and stop receiving emails from it, send an email to node-red+unsubscribe@googlegroups.com.
To post to this group, send email to node...@googlegroups.com.
Visit this group at https://groups.google.com/group/node-red.
To view this discussion on the web, visit https://groups.google.com/d/msgid/node-red/CAA0uCUZBLHty%2B9oHnA9ngOi-A617BfEinZLNEjFjrq15A74neA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Giles Roadnight

unread,
Sep 30, 2016, 10:29:23 AM9/30/16
to node...@googlegroups.com
Great, thanks

On Fri, Sep 30, 2016 at 2:39 PM Nicholas O'Leary <nick....@gmail.com> wrote:
Hi,

please see the example of using the 'os' module via functionGlobalContext in your settings file: http://nodered.org/docs/writing-functions#global-context

Nick

On 30 September 2016 at 14:26, Giles Roadnight <gi...@roadnight.name> wrote:
Hi All
I want to use this crypto library in a function node:


is there any way I can require it and use it in a function node or do I have to turn it into a node?

Thanks

--
http://nodered.org
 
Join us on Slack to continue the conversation: http://nodered.org/slack
---
You received this message because you are subscribed to the Google Groups "Node-RED" group.
To unsubscribe from this group and stop receiving emails from it, send an email to node-red+u...@googlegroups.com.

--
http://nodered.org
 
Join us on Slack to continue the conversation: http://nodered.org/slack
---
You received this message because you are subscribed to the Google Groups "Node-RED" group.
To unsubscribe from this group and stop receiving emails from it, send an email to node-red+u...@googlegroups.com.

To post to this group, send email to node...@googlegroups.com.
Visit this group at https://groups.google.com/group/node-red.
Reply all
Reply to author
Forward
0 new messages