freeCodeCamp/config/env.js

24 lines
482 B
JavaScript
Raw Normal View History

const path = require('path');
if (process.env.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,
} = 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 });