Search code examples
ibm-cloudnode-red

How to get User-Defined variables in node-red app in Bluemix


In my node-red app in Bluemix, I added a User-Defined environment variable. Not sure how to get that variable from a function in my node-red application. Thanks.


Solution

  • You will need to edit the bluemix-settings.js file to include the "process" built-n or other variables in functionGlobalContext.

    functionGlobalContext: { process: process }

    Once redeployed you can access the process in a function node as...

    context.global.process

    https://developer.ibm.com/answers/questions/170246/how-do-i-get-at-my-vcap-variables-from-node-red.html