Skip to content

Composing environment variables #9458

Answered by anthonyshew
tyleralbee asked this question in Help
Discussion options

You must be logged in to vote

Good question, and you're thinking about things attentively. I appreciate the thoughtfully worded question(s).

The way that I like thinking about it is: When I run my code locally, I'm simulating what happens in production. You don't run packages, you run applications that are composed of packages (which is something you correctly alluded to).

With that mental model, you start to realize that a package has no independent runtime. It only runs within the context of an application. So, if I want to model that locally, that would mean I only use .env files in applications.

There's an exception: If you're running scripts directly in packages that require environment variables, you might be fo…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@tyleralbee
Comment options

Answer selected by tyleralbee
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
2 participants