Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function blah() {
- sub.unsubscribe();
- sub.subscribe("a");
- sub.subscribe("b");
- }
- var redis = require('redis')
- const subscribe = redis.createClient({
- host: 'localhost',
- port: 6379
- })
- subscribe.psubscribe(`user:chat:*`)
- subscribe.on('pmessage', function(pattern, channel, message) {
- console.log(channel, message, pattern)
- // Write Your Awesome Code here.
- })
Add Comment
Please, Sign In to add comment