Investigating various patterns for managing configuration and environment variables in Next #23574
Unanswered
eric-burel
asked this question in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Managing configuration based on environment variables can be confusing in Next, especially if you've be using Next before the introduction of
.env
file support in 9.4. Multiple approaches are possible to set a variable depending on its nature: secret or public, server-only or shared with the client, hard-written or dynamic...Examples can be your app current version, your Stripe secret, the domain of your website, the name of your company...
I've just published an article about the patterns I've identified working on Aplines and Vulcan Next, and their use cases: https://blog.vulcanjs.org/how-to-set-configuration-variables-in-next-js-a81505e43dad
In the future, I also hope to share our configuration validation patterns based on this when they are more robust!
Beta Was this translation helpful? Give feedback.
All reactions