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-02-04 11:42:31 +00:00
|
|
|
LOCALE: locale,
|
2019-02-16 08:22:43 +00:00
|
|
|
STRIPE_PUBLIC: stripePublicKey
|
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,
|
|
|
|
newsLocation: news
|
2019-02-04 11:42:31 +00:00
|
|
|
};
|
|
|
|
|
2019-01-31 23:40:23 +05:30
|
|
|
module.exports = Object.assign(locations, { locale, stripePublicKey });
|