Repository URL to install this package:
|
Version:
0.0.0-dbbf5e9efabe69 ▾
|
const { NAMESPACES, DOODLE_ENVS } = require('../constants');
module.exports = envName => {
if (envName === 'local') {
console.log(`'local' is not a deployable namespace. Skipping.`);
}
if (!NAMESPACES.includes(envName)) {
throw new TypeError(
`envName: ${envName} is not recognized. Either correct the spelling, or add it to constants.DOODLE_ENVS`
);
}
// Pluck the values from the DOODLE_ENV object
const envValues = DOODLE_ENVS[envName];
const { serviceBillingBase, monolithApiBase } = envValues;
// Needed for the @doodle/billing-client
if (serviceBillingBase) {
process.env.SVC_BILLING_BASE_URL = serviceBillingBase;
}
// Needed for the @doodle/billing-client
if (monolithApiBase) {
process.env.MONOLITH_API_BASE_URL = monolithApiBase;
}
};