Where is the NODE_ENV being set?

Where is the node_env being set that can be found when you print $_ENV? image

That doesn’t seem right.

As you can see in your screenshot the data is being stored in the variable _ENV instead of $_ENV

So to access that data you would need to {{ _ENV.NODE_ENV }}

But as I said that is not right. How are you defining your environment variable?

I can access it fine :open_mouth: They’re all showing like that

Ah I see why it’s showing that, I’m printing them like this:

Anyway I’m setting my own environment variables in a file that is being called in the docker-compose:

image

But that NODE_ENV is not being set by that file, hence my question where they’re coming from

lib/core/app.js line 43

$_ENV: process.env,

It’s reading the contents of process.env for the server.

1 Like