Skip to content

Commit 1dd5bf8

Browse files
authored
Apply suggestions from code review
1 parent ae80bd3 commit 1dd5bf8

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

docs/user-guide/environment-variables.md

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,9 @@ function:
6060
let foo = env.get("FOO");
6161
```
6262
### Template node
63-
Beginning with [version 3.0](https://nodered.org/blog/2022/07/14/version-3-0-released#environment-variables-in-the-template-node
64-
), the `template` node can access environment variables using the syntax:
63+
*Since [Node-RED 3.0](https://nodered.org/blog/2022/07/14/version-3-0-released#environment-variables-in-the-template-node)*
64+
65+
The `template` node can access environment variables using the syntax:
6566
```
6667
My favourite colour is {{env.COLOUR}}
6768
```
@@ -79,10 +80,12 @@ instances of the Subflow can then be customised for those particular types.
7980

8081
### Flow/Group level environment variables
8182

82-
Since [version 2.1](https://nodered.org/blog/2021/10/21/version-2-1-released#flowgroup-level-environment-variables), environment variables can be set at the flow or group level. This is done in the appropriate tab in the edit dialog for the flow or group.
83+
*Since [Node-RED 2.1](https://nodered.org/blog/2021/10/21/version-2-1-released#flowgroup-level-environment-variables)*
84+
85+
Environment variables can be set at the flow or group level. This is done in the appropriate tab in the edit dialog for the flow or group.
8386

84-
### Raspberry Pi OS considerations
85-
Users who have installed Node-RED on a Raspberry Pi using the provided [script](https://nodered.org/docs/getting-started/raspberrypi) and who run it as a service on booting or by using the `node-red-start` command should be aware that their flows will not have access to environment variables that are defined only in the calling process. In this case, environment variables can be defined in the settings file by statements of the form
87+
### Running as a service
88+
When Node-RED is running as a service having been installed using the provided [script](https://nodered.org/docs/getting-started/raspberrypi), it will not have access to environment variables that are defined only in the calling process. In this instance, environment variables can be defined in the settings file by adding:
8689
````
8790
process.env.FOO= 'World';
8891
````

0 commit comments

Comments
 (0)