This will protect calling the API and recipes will receive the default image.
Option B.
Alternatively, we can do something like flip it so that when we have the environment variable GENERATE_IMAGES=FALSE, we don't generate images. This will save us on one environment variable both locally and on deployment (where we presumably want images).
if (process.env.GENERATE_IMAGES == 'FALSE') {
return;
}
We should be able to disable recipe generating during development for concerns of testing (faster recipe generation) and cost.
Option A.
Check if
GENERATE_IMAGES=TRUE
If this environment variable is false or not set or doesn't exist, we can do something like
This will protect calling the API and recipes will receive the default image.
Option B.
Alternatively, we can do something like flip it so that when we have the environment variable
GENERATE_IMAGES=FALSE
, we don't generate images. This will save us on one environment variable both locally and on deployment (where we presumably want images).