Skip to content

Instantly share code, notes, and snippets.

@Serabe
Forked from ferblape/app.js
Created January 8, 2012 19:56
Show Gist options
  • Save Serabe/1579474 to your computer and use it in GitHub Desktop.
Save Serabe/1579474 to your computer and use it in GitHub Desktop.
Actuable Websockets using Node.JS
var http = require('http'),
redis = require("redis"),
client = redis.createClient();
var io = require('socket.io').listen(3001);
var connected_socket;
io.sockets.on('connection', function (socket) {
client.on("message", function (channel, message) {
socket.emit('message', message);
});
});
client.subscribe("actuable-realtime");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment