Not crashing without configs anymore

This commit is contained in:
Kasper Rynning-Tønnesen
2020-03-04 08:52:57 +01:00
parent f28311a709
commit 72d67d862d
5 changed files with 21 additions and 7 deletions

View File

@@ -0,0 +1,15 @@
try {
module.exports = require("../env/lottery.config");
} catch (e) {
console.error(
"You haven't defined lottery-configs, you sure you want to continue without them?"
);
module.exports = {
name: "NAME MISSING",
phone: "PHONE_MISSING",
price: 10,
message: "INSERT MESSAGE",
date: 5,
hours: 15
};
}

8
config/defaults/push.js Normal file
View File

@@ -0,0 +1,8 @@
try {
module.exports = require("../env/push.config");
} catch (e) {
console.error(
"You haven't defined push-parameters, you sure you want to continue without them?"
);
module.exports = { publicKey: false, privateKey: false, mailto: false };
}