Skip to content

Commit

Permalink
makes env vars non nullable
Browse files Browse the repository at this point in the history
  • Loading branch information
aristidesstaffieri committed Nov 29, 2023
1 parent 4921012 commit 8d5a789
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,17 @@ export function buildConfig(config: Record<string, string>) {
});

return {
hostname: config.HOSTNAME || process.env.HOSTNAME,
mercuryBackend: config.MERCURY_BACKEND || process.env.MERCURY_BACKEND,
mercuryEmail: config.AUTH_EMAIL || process.env.AUTH_EMAIL,
mercuryGraphQL: config.MERCURY_GRAPHQL || process.env.MERCURY_GRAPHQL,
mercuryKey: config.MERCURY_KEY || process.env.MERCURY_KEY,
mercuryPassword: config.AUTH_PASS || process.env.AUTH_PASS,
mercuryUserId: config.MERCURY_USER_ID || process.env.MERCURY_USER_ID,
mode: config.MODE || process.env.MODE,
hostname: config.HOSTNAME || process.env.HOSTNAME!,
mercuryBackend: config.MERCURY_BACKEND || process.env.MERCURY_BACKEND!,
mercuryEmail: config.AUTH_EMAIL || process.env.AUTH_EMAIL!,
mercuryGraphQL: config.MERCURY_GRAPHQL || process.env.MERCURY_GRAPHQL!,
mercuryKey: config.MERCURY_KEY || process.env.MERCURY_KEY!,
mercuryPassword: config.AUTH_PASS || process.env.AUTH_PASS!,
mercuryUserId: config.MERCURY_USER_ID || process.env.MERCURY_USER_ID!,
mode: config.MODE || process.env.MODE!,
redisConnectionName:
config.REDIS_CONNECTION_NAME || process.env.REDIS_CONNECTION_NAME,
redisPort: Number(config.REDIS_PORT) || Number(process.env.REDIS_PORT),
config.REDIS_CONNECTION_NAME || process.env.REDIS_CONNECTION_NAME!,
redisPort: Number(config.REDIS_PORT) || Number(process.env.REDIS_PORT!),
};
}

Expand Down

0 comments on commit 8d5a789

Please sign in to comment.