fix(client,tools): update proxy and location paths (#37106)

This commit is contained in:
mrugesh
2019-10-07 16:42:07 -07:00
committed by GitHub
parent 752a3d6d88
commit 4889e0fdc6
5 changed files with 27 additions and 25 deletions

View File

@ -13,12 +13,7 @@ const log = debug('fcc:tools:ensure-env');
const { FREECODECAMP_NODE_ENV } = process.env;
const {
apiLocation: api,
forumLocation: forum,
locale,
newsLocation: news
} = env;
const { apiLocation: api, locale, forumProxy, newsProxy } = env;
const apiPath = path.resolve(__dirname, '../../../api-server');
const clientPath = path.resolve(__dirname, '../../../client');
@ -26,7 +21,7 @@ const clientStaticPath = path.resolve(clientPath, 'static');
const globalConfigPath = path.resolve(__dirname, '../../../config');
if (FREECODECAMP_NODE_ENV === 'production') {
const redirects = createRedirects({ api, news, forum });
const redirects = createRedirects({ api, newsProxy, forumProxy });
fs.writeFile(`${clientStaticPath}/_redirects`, redirects, function(err) {
if (err) {
log('Error');