]>
git.immae.eu Git - github/Chocobozzz/PeerTube.git/blob - shared/utils/miscs/email-child-process.js
1 const MailDev
= require('maildev')
3 // must run maildev as forked ChildProcess
4 // failed instantiation stops main process with exit code 0
5 process
.on('message', (msg
) => {
7 const maildev
= new MailDev({
14 maildev
.on('new', email
=> {
15 process
.send({ email
})
18 maildev
.listen(err
=> {
20 // cannot send as Error object
21 return process
.send({ err: err
.message
})
24 return process
.send({ err: null })