2019-02-04 11:42:31 +00:00
|
|
|
const path = require('path');
|
|
|
|
|
2019-08-19 01:19:40 +05:30
|
|
|
if (process.env.FREECODECAMP_NODE_ENV !== 'production') {
|
2019-02-04 11:42:31 +00:00
|
|
|
const envPath = path.resolve(__dirname, '../.env');
|
|
|
|
require('dotenv').config({ path: envPath });
|
|
|
|
}
|
|
|
|
|
|
|
|
const {
|
|
|
|
HOME_LOCATION: home,
|
|
|
|
API_LOCATION: api,
|
|
|
|
FORUM_LOCATION: forum,
|
2019-02-05 20:28:45 +00:00
|
|
|
NEWS_LOCATION: news,
|
2019-10-07 16:42:07 -07:00
|
|
|
FORUM_PROXY: forumProxy,
|
|
|
|
NEWS_PROXY: newsProxy,
|
2019-02-04 11:42:31 +00:00
|
|
|
LOCALE: locale,
|
2019-10-04 18:03:20 +02:00
|
|
|
STRIPE_PUBLIC: stripePublicKey,
|
|
|
|
ALGOLIA_APP_ID: algoliaAppId,
|
|
|
|
ALGOLIA_API_KEY: algoliaAPIKey
|
2019-02-04 11:42:31 +00:00
|
|
|
} = process.env;
|
|
|
|
|
|
|
|
const locations = {
|
|
|
|
homeLocation: home,
|
|
|
|
apiLocation: api,
|
2019-02-05 20:28:45 +00:00
|
|
|
forumLocation: forum,
|
2019-10-07 16:42:07 -07:00
|
|
|
newsLocation: news,
|
|
|
|
forumProxy: forumProxy,
|
|
|
|
newsProxy: newsProxy
|
2019-02-04 11:42:31 +00:00
|
|
|
};
|
|
|
|
|
2019-10-04 18:03:20 +02:00
|
|
|
module.exports = Object.assign(locations, {
|
|
|
|
locale,
|
|
|
|
stripePublicKey,
|
|
|
|
algoliaAppId,
|
|
|
|
algoliaAPIKey
|
|
|
|
});
|