fix: Update config to be flexible for host

This commit is contained in:
Mrugesh Mohapatra
2017-02-22 13:04:21 +00:00
parent d5db2803ad
commit 566de3e3f2
4 changed files with 11 additions and 4 deletions

View File

@ -12,6 +12,7 @@ import { blacklistedUsernames } from '../../server/utils/constants';
const debug = debugFactory('fcc:user:remote');
const BROWNIEPOINTS_TIMEOUT = [1, 'hour'];
const isDev = process.env.NODE_ENV !== 'production';
const devHost = process.env.HOST || 'localhost';
function getAboutProfile({
username,
@ -443,7 +444,7 @@ module.exports = function(User) {
from: 'Team@freecodecamp.com',
subject: 'Welcome to freeCodeCamp!',
protocol: isDev ? null : 'https',
host: isDev ? 'localhost' : 'freecodecamp.com',
host: isDev ? devHost : 'freecodecamp.com',
port: isDev ? null : 443,
template: path.join(
__dirname,