freeCodeCamp/config/env.js

25 lines
545 B
JavaScript
Raw Normal View History

const path = require('path');
2019-08-18 19:49:40 +00:00
if (process.env.FREECODECAMP_NODE_ENV !== 'production') {
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,
LOCALE: locale,
2019-02-16 08:22:43 +00:00
STRIPE_PUBLIC: stripePublicKey
} = process.env;
const locations = {
homeLocation: home,
apiLocation: api,
2019-02-05 20:28:45 +00:00
forumLocation: forum,
newsLocation: news
};
module.exports = Object.assign(locations, { locale, stripePublicKey });