From a4cd167006bb42b2ebd8af8fb8f7e4121eeeb450 Mon Sep 17 00:00:00 2001 From: IMHOJEONG <39ghwjd@naver.com> Date: Sat, 30 Dec 2023 16:33:46 +0900 Subject: [PATCH] [revise]: add statement in NODE_ENV --- apps/pwrcode-backend/src/app.module.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/apps/pwrcode-backend/src/app.module.ts b/apps/pwrcode-backend/src/app.module.ts index faeec43..7e4aaed 100755 --- a/apps/pwrcode-backend/src/app.module.ts +++ b/apps/pwrcode-backend/src/app.module.ts @@ -11,7 +11,11 @@ import { SearchModule } from './modules/search/search.module'; imports: [ ConfigModule.forRoot({ // envFilePath: ['.env.development', '.env.production'], - envFilePath: ['.env.production'], + envFilePath: [ + process.env.NODE_ENV === 'production' + ? '.env.production' + : '.env.development', + ], }), TypeOrmModule.forRoot({ type: 'mysql',