Skip to content

Commit

Permalink
[#7] fix: remove early exit if db url env not set
Browse files Browse the repository at this point in the history
  • Loading branch information
glemenneo committed Sep 18, 2024
1 parent 60e92be commit 831983b
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions backend/user-service/src/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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`)
})
Expand Down

0 comments on commit 831983b

Please sign in to comment.