Add better logging when setting custom env var using .env
This commit is contained in:
Родитель
3f51f59c55
Коммит
693955995b
|
@ -37,3 +37,5 @@ Thumbs.db
|
|||
# Ignore built ts files
|
||||
dist/**/*
|
||||
|
||||
# ignore yarn.lock
|
||||
yarn.lock
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче