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

Merge pull request #182 from Jareechang/f-update-local-mongo-env-logging

Add better logging when setting custom env var using .env
This commit is contained in:
Orta
2019-06-19 14:24:14 -07:00
committed by GitHub
2 changed files with 7 additions and 1 deletions

2
.gitignore vendored
View File

@@ -37,3 +37,5 @@ Thumbs.db
# Ignore built ts files
dist/**/*
# ignore yarn.lock
yarn.lock

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);
}