1
0
mirror of https://github.com/microsoft/TypeScript-Node-Starter.git synced 2025-11-09 00:37:27 +00:00

Add better logging when setting custom env var using .env

This commit is contained in:
Jerry Chang
2019-03-16 14:29:34 -07:00
parent 3f51f59c55
commit 693955995b
2 changed files with 7 additions and 1 deletions

View File

@@ -21,6 +21,10 @@ if (!SESSION_SECRET) {
}
if (!MONGODB_URI) {
logger.error("No mongo connection string. Set MONGODB_URI environment variable.");
if (prod) {
logger.error("No mongo connection string. Set MONGODB_URI environment variable.");
} else {
logger.error("No mongo connection string. Set MONGODB_URI_LOCAL environment variable.");
}
process.exit(1);
}