Skip to content

Commit

Permalink
Typecast to number or null
Browse files Browse the repository at this point in the history
  • Loading branch information
kabirbaidhya authored Feb 3, 2020
1 parent 928d5d2 commit 5c59b0e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ export function resolveConnectionsFromEnv(): ConnectionConfig[] {
const connection = {
client: process.env.DB_CLIENT,
host: process.env.DB_HOST,
port: +(process.env.DB_PORT),
port: process.env.DB_PORT ? +(process.env.DB_PORT) : null,
user: process.env.DB_USERNAME,
password: process.env.DB_PASSWORD,
database: process.env.DB_NAME,
Expand Down

0 comments on commit 5c59b0e

Please sign in to comment.