Use an environment variable when running our node application and have node inherit it in process.env.
Steps tried
Set allowEnvVars to true
Added an env object with a key value pair of “ENV_FILE”: “.env.lp_dev”
From what I can see the app schema here doesn’t provide a environment variable configuration for type “node”, only thing related I can see is “nodeCLIOptions”. It seems however to be present on “window” and “exe” application types.
Does interop support this for node apps? To be clear this isn’t a web app, its a node CLI app that we auto start as part of our setup, there is no UI, hence not using it as a window.
Actual vs expected
Expected process.env to include our environment variable, which wasn’t the case.
So the only alternative here for being able to set environment variables is to use an exe type application and call the node command directly? We’ve got plenty of cases at the moment where we need to run a node app that needs to use environment variables and it sounds like the node app type is very limited- what options do we have instead of this?
Sorry for the delay. Can you provide a bit more detail about your use case and workflow here?
allowEnvVars is for web apps and enables them to access the main process env variables using glue42gd.env object. And node app started as apps should inherit these vars by default.