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

@@ -5,6 +5,7 @@ import path from 'path';
const debug = debugFactory('fcc:user:remote');
const isDev = process.env.NODE_ENV !== 'production';
const devHost = process.env.HOST || 'localhost';
function destroyAllRelated(id, Model) {
return Observable.fromNodeCallback(
@@ -77,7 +78,7 @@ module.exports = function(app) {
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,