Skip to content

Commit

Permalink
feat: adds frontend app learning mfe base url (openedx#243)
Browse files Browse the repository at this point in the history
This PR adds `config.LEARNING_BASE_UR` for all frontends to use.
  • Loading branch information
awaisdar001 authored Nov 3, 2021
1 parent 78d3f69 commit d1823fa
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions .env.development
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ DISCOVERY_API_BASE_URL=http://localhost:18381
PUBLISHER_BASE_URL=http://localhost:18400
ECOMMERCE_BASE_URL=http://localhost:18130
LANGUAGE_PREFERENCE_COOKIE_NAME=openedx-language-preference
LEARNING_BASE_URL=http://localhost:2000
LMS_BASE_URL=http://localhost:18000
LOGIN_URL=http://localhost:18000/login
LOGOUT_URL=http://localhost:18000/logout
Expand Down
1 change: 1 addition & 0 deletions .env.test
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ DISCOVERY_API_BASE_URL=http://localhost:18381
PUBLISHER_BASE_URL=http://localhost:18400
ECOMMERCE_BASE_URL=http://localhost:18130
LANGUAGE_PREFERENCE_COOKIE_NAME=openedx-language-preference
LEARNING_BASE_URL=http://localhost:2000
LMS_BASE_URL=http://localhost:18000
LOGIN_URL=http://localhost:18000/login
LOGOUT_URL=http://localhost:18000/logout
Expand Down
2 changes: 2 additions & 0 deletions src/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ let config = {
ENVIRONMENT,
IGNORED_ERROR_REGEX: extractRegex(process.env.IGNORED_ERROR_REGEX),
LANGUAGE_PREFERENCE_COOKIE_NAME: process.env.LANGUAGE_PREFERENCE_COOKIE_NAME,
LEARNING_BASE_URL: process.env.LEARNING_BASE_URL,
LMS_BASE_URL: process.env.LMS_BASE_URL,
LOGIN_URL: process.env.LOGIN_URL,
LOGOUT_URL: process.env.LOGOUT_URL,
Expand Down Expand Up @@ -176,6 +177,7 @@ export function ensureConfig(keys, requester = 'unspecified application code') {
* @property {string} ENVIRONMENT This is one of: development, production, or test.
* @property {string} IGNORED_ERROR_REGEX
* @property {string} LANGUAGE_PREFERENCE_COOKIE_NAME
* @property {string} LEARNING_BASE_URL
* @property {string} LMS_BASE_URL
* @property {string} LOGIN_URL
* @property {string} LOGOUT_URL
Expand Down
1 change: 1 addition & 0 deletions src/setupTest.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ process.env.PUBLISHER_BASE_URL = 'http://localhost:18400';
process.env.ECOMMERCE_BASE_URL = 'http://localhost:18130';
process.env.LANGUAGE_PREFERENCE_COOKIE_NAME = 'openedx-language-preference';
process.env.LMS_BASE_URL = 'http://localhost:18000';
process.env.LEARNING_BASE_URL = 'http://localhost:2000';
process.env.LOGIN_URL = 'http://localhost:18000/login';
process.env.LOGOUT_URL = 'http://localhost:18000/logout';
process.env.STUDIO_BASE_URL = 'http://localhost:18010';
Expand Down

0 comments on commit d1823fa

Please sign in to comment.