FlowFuse / nr-project-nodes

A set of Node-RED nodes for inter-project communication within the FlowFuse platform
Apache License 2.0
5 stars 0 forks source link

Support `env` type values in topic fields #34

Open knolleary opened 1 year ago

knolleary commented 1 year ago

Description

To make it easier to construct topics using env vars, we should enhance the topic field to be a TypedInput with support for both string (default) and env types.

The env type would then allow the topic to be set to something like foo-${SOME_ENV_VAR}.

The workaround is to set a Flow level env var to that value, and then reference that env var in the Project Node.

Steve-Mcl commented 1 year ago

To clarify:

We should change the topic field to a typedInput and permit "str", "env" on the subscriptions (link call, link-in)

What about the pubs (i.e. link-out) - might we want to support msg as well (to permit user to set the topic dynamically via msg.topic for example)?