From 831983bd729a0acc79f7847fe6306a60ec83d57d Mon Sep 17 00:00:00 2001 From: Glemen Neo Date: Wed, 18 Sep 2024 18:14:44 +0800 Subject: [PATCH] [#7] fix: remove early exit if db url env not set --- backend/user-service/src/server.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/backend/user-service/src/server.ts b/backend/user-service/src/server.ts index 9630448bd8..081e0a5c4d 100644 --- a/backend/user-service/src/server.ts +++ b/backend/user-service/src/server.ts @@ -20,12 +20,11 @@ const port: string = process.env.PORT ?? '3000' const dbUrl: string | undefined = process.env.DB_URL if (!dbUrl) { logger.error(`[Init] DB_URL is not set`) - process.exit(1) } const server: Server = http.createServer(index) -connect(dbUrl) +connect(dbUrl!) .then(() => { logger.info(`[Init] Connected to MongoDB`) })