diff --git a/scripts/price-scanner.js b/scripts/price-scanner.js index 31d2fb5..7836b9f 100644 --- a/scripts/price-scanner.js +++ b/scripts/price-scanner.js @@ -5,6 +5,17 @@ const mongoUri = process.env.MONGO_URI; let cachedDb = null; +if(apiKey === undefined){ + console.error('KASSALAPP_API_KEY is missing'); + process.exit(1); + +} + +if(mongoUri === undefined){ + console.error('MONGO_URI is missing'); + process.exit(1); +} + // Fetch list of all ingredients from MongoDB const fetchListOfIngredientsFromMongoDB = async () => { const client = new MongoClient(mongoUri);