Skip to content

Instantly share code, notes, and snippets.

@WaleedAshraf
Created March 25, 2018 19:04
Show Gist options
  • Save WaleedAshraf/5592da82a6440c52bf373e5d23766bdf to your computer and use it in GitHub Desktop.
Save WaleedAshraf/5592da82a6440c52bf373e5d23766bdf to your computer and use it in GitHub Desktop.
Switching from cluster module to PM2 & RabbitMQ
// exports RabbitMQ connection
const MQ = require('./rabbitmq-config');
MQ.on('sms', function(data) {
sendSMS(data); // use twilio or something to send sms
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment