chore: update usage of environment variables

This commit is contained in:
Leangseu Kim
2022-10-25 15:40:43 -04:00
committed by leangseu-edx
parent 61e484af1f
commit 3973d173cf
5 changed files with 5 additions and 5 deletions

2
.env
View File

@@ -30,4 +30,4 @@ ENTERPRISE_MARKETING_URL=''
ENTERPRISE_MARKETING_UTM_SOURCE=''
ENTERPRISE_MARKETING_UTM_CAMPAIGN=''
ENTERPRISE_MARKETING_FOOTER_UTM_MEDIUM=''
LEARNING_MICROFRONTEND_URL=''
LEARNING_BASE_URL=''

View File

@@ -36,4 +36,4 @@ ENTERPRISE_MARKETING_URL='http://example.com'
ENTERPRISE_MARKETING_UTM_SOURCE='example.com'
ENTERPRISE_MARKETING_UTM_CAMPAIGN='example.com Referral'
ENTERPRISE_MARKETING_FOOTER_UTM_MEDIUM='Footer'
LEARNING_MICROFRONTEND_URL='http://localhost:2000'
LEARNING_BASE_URL='http://localhost:2000'

View File

@@ -36,4 +36,4 @@ ENTERPRISE_MARKETING_URL='http://example.com'
ENTERPRISE_MARKETING_UTM_SOURCE='example.com'
ENTERPRISE_MARKETING_UTM_CAMPAIGN='example.com Referral'
ENTERPRISE_MARKETING_FOOTER_UTM_MEDIUM='Footer'
LEARNING_MICROFRONTEND_URL='http://localhost:2000'
LEARNING_BASE_URL='http://localhost:2000'

View File

@@ -9,7 +9,7 @@ const configuration = {
// SECURE_COOKIES: process.env.NODE_ENV !== 'development',
// SEGMENT_KEY: process.env.SEGMENT_KEY,
// ACCESS_TOKEN_COOKIE_NAME: process.env.ACCESS_TOKEN_COOKIE_NAME,
LEARNING_MICROFRONTEND_URL: process.env.LEARNING_MICROFRONTEND_URL,
LEARNING_BASE_URL: process.env.LEARNING_BASE_URL,
};
const features = {};

View File

@@ -15,7 +15,7 @@ const entitlementEnrollment = (uuid) => `${api}/entitlements/v1/entitlements/${u
const isAbsoluteUrl = (url) => url.startsWith('http://') || url.startsWith('https://');
export const baseAppUrl = (url) => (isAbsoluteUrl(url) ? url : baseUrl + url);
export const learningMfeUrl = (url) => (isAbsoluteUrl(url) ? url : configuration.LEARNING_MICROFRONTEND_URL + url);
export const learningMfeUrl = (url) => (isAbsoluteUrl(url) ? url : configuration.LEARNING_BASE_URL + url);
// static view url
const programsUrl = baseAppUrl('/dashboard/programs');