diff --git a/sample.env b/sample.env index ab060070fc..54a9f2a6a2 100644 --- a/sample.env +++ b/sample.env @@ -26,7 +26,7 @@ IMAGE_BASE_URL='https://s3.amazonaws.com/freecodecamp/images/' HOME_LOCATION='http://localhost:8000' API_LOCATION='http://localhost:3000' FORUM_LOCATION='https://forum.localhost' -FORUM_PROXY_LOCATION='https://proxy.localhost' +NEWS_LOCATION='https://news.localhost/latest' LOCALE=english TEST_CHALLENGES_FOR_LANGS=english diff --git a/tools/scripts/ensure-env.js b/tools/scripts/ensure-env.js index 163e8716ff..5a9eab8317 100644 --- a/tools/scripts/ensure-env.js +++ b/tools/scripts/ensure-env.js @@ -13,7 +13,12 @@ const log = debug('fcc:tools:ensure-env'); const { NODE_ENV } = process.env; -const { homeLocation: home, apiLocation: api, forumLocation: forum, locale } = env; +const { + apiLocation: api, + forumLocation: forum, + locale, + newsLocation: news +} = env; const apiPath = path.resolve(__dirname, '../../api-server'); const clientPath = path.resolve(__dirname, '../../client'); @@ -21,7 +26,7 @@ const clientStaticPath = path.resolve(clientPath, 'static'); const globalConfigPath = path.resolve(__dirname, '../../config'); if (NODE_ENV === 'production') { - const redirects = createRedirects({ api, home, forum }); + const redirects = createRedirects({ api, news, forum }); fs.writeFile(`${clientStaticPath}/_redirects`, redirects, function(err) { if (err) { log('Error');