Environment variable verification on startup #2604
Unanswered
roshan-sama
asked this question in
RFCs
Replies: 1 comment
-
Good suggestion! I think it probably would make sense, but I'm not super happy with envsafe. I'm currently using it, but it's tricky to separately validate client vs server env vars. Ideally the validation library would have built in support for isomorphic things. Ideally a way to define all client and server envs in the same file. Currently with envsafe it has to be separate files. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
With the new initServer feature in blitz.config.ts, I have begun to verify all my environment variables using a function that calls all the variables in .env
blitz.config.ts
integrations\envsafe.ts
Would it make sense to add something this by default to new apps? Looking at #1152 it looks like there is an alternative to set client env vars apart from the NEXT_PUBLIC_ environment variables so that could potentially be implemented together with this
Beta Was this translation helpful? Give feedback.
All reactions