Guest User

Untitled

a guest
Feb 28th, 2018
158
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.50 KB | None | 0 0
  1. // Initializes the `/mailer` service on path `/mailer`
  2. const hooks = require('./mailer.hooks');
  3. const Mailer = require('feathers-mailer');
  4. const smtpTransport = require('nodemailer-smtp-transport');
  5.  
  6. module.exports = function (app) {
  7. app.use('/mailer', Mailer(smtpTransport({
  8. host: 'email-smtp.us-east-1.amazonaws.com',
  9. secure: true,
  10. auth: {
  11. user: process.env.SMTP_USER,
  12. pass: process.env.SMTP_PASS
  13. }
  14. })));
  15.  
  16. const service = app.service('mailer');
  17. service.hooks(hooks);
  18. };
Add Comment
Please, Sign In to add comment