Runtime Build Question
Unanswered
American black bear posted this in #help-forum
American black bearOP
Hey guys, quick question about Next.js Standalone builds! I'm trying to figure out the best way to handle config stuff. When I build using the standalone option, how do I make sure my app doesn't just hard-code all the data from my .env files or some local config.json (you know, reading it with fs)? I need that config (env vars or that JSON data) to be read only when the server actually runs/starts up, not during the build. The whole point is that I can swap configurations later on different deployments without having to rebuild the whole container every time. What's the recommended, "pro" way to do this with Next.js Standalone? Any tips appreciated! Thanks!
1 Reply
Asian black bear