I have a node-red HTTP Request node. I want to use as url, something like this:
How can I substitute server_host
and server_port
with their equivalent value from the environment?
I don't want to add another node just to set this url, if possible
I've tried:
${SERVER_HOST}
$(SERVER_HOST)
$env(SERVER_HOST)
${'SERVER_HOST'}
$('SERVER_HOST')
$env('SERVER_HOST')
You can only set the whole value from a single environment variable directly in nodes configuration.
So you have 2 options:
$(SERVER_URL)
msg.url
and then pass that into the HTTP-request node.