const kue = require('kue'); const queue = kue.createQueue(); const sendEmail = require('./send-email'); // The script from step 3 queue.process('email', (job, done) => { sendEmail(job.data.email, job.data.subject, job.data.html); done(); });
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter