You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/developers/components/reference.md
+20Lines changed: 20 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -69,6 +69,26 @@ harper-nextjs-test-feature:
69
69
# ...
70
70
```
71
71
72
+
#### Environment Variable Loading
73
+
74
+
All Harper components support environment variable loading using the `loadEnv` option.
75
+
76
+
This option can be set to `true` to automatically load a `.env` file from the component root, or set to a string of the path to an environment variable file.
77
+
78
+
For example, to automatically load `/.env`:
79
+
80
+
```yaml
81
+
loadEnv: true
82
+
```
83
+
84
+
Or to specify an exact environment variable file:
85
+
86
+
```yaml
87
+
loadEnv: '.env.production'
88
+
```
89
+
90
+
> Important: Harper is a single process application. Environment variables are loaded onto `process.env` and will be shared throughout all Harper components. This means environment variables loaded by one component will be available on other components (as long as the components are loaded in the correct order).
91
+
72
92
### Default Component Configuration
73
93
74
94
Harper components do not need to specify a `config.yaml`. Harper uses the following default configuration to load components.
0 commit comments