Skip to content

Commit

Permalink
fix(app-config): Use parentheses to fix string concat in config
Browse files Browse the repository at this point in the history
Changes:
- wrap `process.env.DOMAIN || ''` in parentheses to correct the order of the OR operator and string concat

Closes #466
  • Loading branch information
kingcody committed Aug 21, 2014
1 parent 44267bf commit c6a50ce
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions app/templates/server/config/environment/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,24 +44,24 @@ var all = {
facebook: {
clientID: process.env.FACEBOOK_ID || 'id',
clientSecret: process.env.FACEBOOK_SECRET || 'secret',
callbackURL: process.env.DOMAIN || '' + '/auth/facebook/callback'
callbackURL: (process.env.DOMAIN || '') + '/auth/facebook/callback'
},
<% } if(filters.twitterAuth) { %>
twitter: {
consumerKey: process.env.TWITTER_ID || 'id',
consumerSecret: process.env.TWITTER_SECRET || 'secret',
callbackURL: process.env.DOMAIN || '' + '/auth/twitter/callback'
callbackURL: (process.env.DOMAIN || '') + '/auth/twitter/callback'
},
<% } if(filters.googleAuth) { %>
google: {
clientID: process.env.GOOGLE_ID || 'id',
clientSecret: process.env.GOOGLE_SECRET || 'secret',
callbackURL: process.env.DOMAIN || '' + '/auth/google/callback'
callbackURL: (process.env.DOMAIN || '') + '/auth/google/callback'
}<% } %>
};

// Export the config object based on the NODE_ENV
// ==============================================
module.exports = _.merge(
all,
require('./' + process.env.NODE_ENV + '.js') || {});
require('./' + process.env.NODE_ENV + '.js') || {});

0 comments on commit c6a50ce

Please sign in to comment.