Process is not defined when trying to access strapi locally

you wouldn’t use it there, it’s in the config directory

you pass the env vars to the plugin config and the plugin reads those

Create a new config file at ./config/env/production/plugins.js and set the var in there then try running Strapi using yarn develop vs NODE_ENV=production yarn develop and log out the config in the plugin and see the differences

this is where we describe the environment system: Environment variables | Strapi Documentation

Im not sure if that helps in my case though

The issue I’m having is that process comes back as undefined in strapi

and if I set the env vars in the config how can I access them without that?

strapi.config.get('plugin.pluginName') I believe off the top of my head

^ that is only in the backend though, not the admin

So if I want to use an env variable in the bootstrap step

I need to create a plugin

set the env variable in the config

then call that during bootstrap?

No you can just use the env() functions but it depends on what you are doing

env() comes from our utils package.

how can I use env() in the bootstrap phase?

I could find a way to do this

something like this, difficult to see because of the startup logging but:

there are several sub functions to env() to do casting of the values into different formats, I’d suggest looking at this docs if you need something other than strings: Environment variables | Strapi Documentation

Ahh thats probably what I need