This repository has been archived by the owner on Aug 30, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[hotfix] SeedDB missing in env config
Adds a check for the existence of the seedDB config setting, before attempting to read config.seedDB.seed setting. Solves the problem when the seedDB config setting is missing from a environment config, that causes the application to throw an exception at startup. Also, adds the seedDB setting to the Cloud-Foundry env config.
- Loading branch information
Showing
2 changed files
with
25 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -66,5 +66,29 @@ module.exports = { | |
pass: getCred('mean-mail', 'password') || 'MAILER_PASSWORD' | ||
} | ||
} | ||
}, | ||
seedDB: { | ||
seed: process.env.MONGO_SEED === 'true' ? true : false, | ||
options: { | ||
logResults: process.env.MONGO_SEED_LOG_RESULTS === 'false' ? false : true, | ||
seedUser: { | ||
username: process.env.MONGO_SEED_USER_USERNAME || 'user', | ||
provider: 'local', | ||
email: process.env.MONGO_SEED_USER_EMAIL || '[email protected]', | ||
firstName: 'User', | ||
lastName: 'Local', | ||
displayName: 'User Local', | ||
roles: ['user'] | ||
}, | ||
seedAdmin: { | ||
username: process.env.MONGO_SEED_ADMIN_USERNAME || 'admin', | ||
provider: 'local', | ||
email: process.env.MONGO_SEED_ADMIN_EMAIL || '[email protected]', | ||
firstName: 'Admin', | ||
lastName: 'Local', | ||
displayName: 'Admin Local', | ||
roles: ['user', 'admin'] | ||
} | ||
} | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters