Skip to content
This repository has been archived by the owner on Mar 17, 2020. It is now read-only.

Commit

Permalink
fix(app): joi schema
Browse files Browse the repository at this point in the history
  • Loading branch information
András Tóth committed Jan 6, 2020
1 parent cdb637c commit 586c5e8
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions web/database/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@ const envVarsSchema = joi
// prettier-ignore
({
MONGODB_USERNAME = '', MONGODB_PASSWORD = '', MONGODB_HOST = '127.0.0.1', MONGODB_PORT = 27017, MONGODB_DATABASE = '', MONGODB_AUTH_SOURCE = ''
}) => `mongodb://${MONGODB_USERNAME}:${MONGODB_PASSWORD}@${MONGODB_HOST}:${MONGODB_PORT}/${MONGODB_DATABASE}${MONGODB_AUTH_SOURCE ? `?authSource=${MONGODB_AUTH_SOURCE}` : ''}`,
'construct URI from other environment variables'
}) => `mongodb://${MONGODB_USERNAME}:${MONGODB_PASSWORD}@${MONGODB_HOST}:${MONGODB_PORT}/${MONGODB_DATABASE}${MONGODB_AUTH_SOURCE ? `?authSource=${MONGODB_AUTH_SOURCE}` : ''}`
),
MONGODB_HOST: joi
.string()
Expand Down

0 comments on commit 586c5e8

Please sign in to comment.