File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -27,6 +27,7 @@ See https://github.com/lorenwest/node-config/wiki/Configuration-Files
2727| ` JWT_SECRET ` | The jwt secret |
2828| ` mail.SMTP_HOST ` | The smtp hostname |
2929| ` mail.SMTP_PORT ` | The smtp port |
30+ | ` mail.EMAIL_FROM ` | The from email address |
3031| ` mail.SMTP_USERNAME ` | The smtp username |
3132| ` mail.SMTP_PASSWORD ` | The smtp password |
3233
@@ -61,8 +62,8 @@ you also can export those values before run(data from forum).
6162` export AUTH0_CLIENT_ID="3CGKzjS2nVSqHxHHE64RhvvKY6e0TYpK" `
6263` export JWT_SECRET="fJtXfFYt-F9iees7CSw8rOOr-tYsJocoZTz3pLF5NynamB07JFPeFOEuzfbcT7SD" `
6364` export MONGOLAB_URI="mongodb://topcoder:t0pP455@ds147777.mlab.com:47777/dsp1" `
64- #modify
65- register and social login add role params
66- default is ` consumer ` if role is empty
67- #video
68- https://youtu.be/rYBDekZ-hik
65+ ` export SMTP_HOST="smtp.gmail.com" `
66+ ` export SMTP_PORT="465" `
67+ ` export SMTP_USERNAME="youremail" `
68+ ` export SMTP_PASSWORD="yourpassword" `
69+ ` export EMAIL_FROM="your@email.com" `
Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ const config = require('config');
1515
1616const jwtCheck = jwt ( {
1717 // the auth0 doesn't base 64 encode the jwt secret now
18- secret : config . JWT_SECRET ,
18+ secret : new Buffer ( config . JWT_SECRET , 'base64' ) ,
1919 audience : config . AUTH0_CLIENT_ID ,
2020 requestProperty : 'auth' ,
2121 getToken : function fromHeaderOrQuerystring ( req ) {
Original file line number Diff line number Diff line change @@ -25,9 +25,9 @@ module.exports = {
2525 poolSize : 5 ,
2626 } ,
2727 mail : {
28- SMTP_HOST : 'smtp.mailgun.org' ,
29- SMTP_PORT : 587 ,
30- FROM_EMAIL : 'noreply@kb-dsp-server-dev.herokuapp.com' ,
28+ SMTP_HOST : process . env . SMTP_HOST ,
29+ SMTP_PORT : process . env . SMTP_PORT ,
30+ FROM_EMAIL : process . env . EMAIL_FROM ,
3131 SMTP_USERNAME : process . env . SMTP_USERNAME ,
3232 SMTP_PASSWORD : process . env . SMTP_PASSWORD ,
3333 } ,
You can’t perform that action at this time.
0 commit comments