Updated project changes
This commit is contained in:
+5
-1
@@ -40,8 +40,12 @@ const SERVER_ENV_KEYS = [
|
||||
]
|
||||
|
||||
function devApi(env) {
|
||||
// .env is authoritative in dev: always apply it so edits are picked up on a
|
||||
// server restart. (A `!process.env[k]` guard here would keep a stale value
|
||||
// from a previous load — e.g. the placeholder secret key — and silently
|
||||
// ignore the real key you just added.)
|
||||
for (const k of SERVER_ENV_KEYS) {
|
||||
if (env[k] && !process.env[k]) process.env[k] = env[k]
|
||||
if (env[k]) process.env[k] = env[k]
|
||||
}
|
||||
return {
|
||||
name: 'dev-api',
|
||||
|
||||
Reference in New Issue
Block a user