chameleonbr / node-red-contrib-redis

Node RED client for Redis with pub/sub, list, lua scripting and other commands support.
MIT License
46 stars 40 forks source link

Added support of env variables #26

Closed ziflex closed 4 years ago

ziflex commented 4 years ago

Added possibility to use env variables in options. (${VAL}).

kenime commented 4 years ago

Hi ziflex, I think this is similar to my PR, which leverages JSONata to support env / global / flow variables instead. What do you think if we use my approach since in my humble opinion it is neater to use OOTB function instead

ziflex commented 4 years ago

@kenime sure why not. But could you show me an example of how I would be able to use env variables?

kenime commented 4 years ago

https://nodered.org/docs/user-guide/environment-variables

{
  "host": $env('HOST_ENV_VAR'),
  "port": $env('PORT_ENV_VAR')
}