From 973201e7874ab8a86d6c1770b47df9e7a1038aec Mon Sep 17 00:00:00 2001 From: David Ball Date: Sat, 15 Jun 2024 16:50:37 -0400 Subject: [PATCH] fix: problem with reading environment using dotenv. --- app/config.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/config.js b/app/config.js index c18121b3..18824330 100644 --- a/app/config.js +++ b/app/config.js @@ -5,8 +5,9 @@ const dotenv = require('dotenv'); const dotenvExpand = require('dotenv-expand'); const process = require('process'); -let env = dotenv.config(); -dotenvExpand.expand(env); +const env = {}; +let dotEnvConfig = dotenv.config({ processEnv: env }); +dotEnvConfig = dotenvExpand.expand({ parsed: env, processEnv: env }); const getAppHttpHost = () => env.APP_HTTP_HOST||'nm3clol-express-app'; const getAppHttpPort = () => process.env.PORT||env.APP_HTTP_PORT||3000;