Closed excxapp closed 10 years ago
Ah, that's right. Thanks for reporting! The emitter also requires the host
and port
parameters in the constructor. I have updated the README to include this. Here's the changed row:
var io = require('socket.io-emitter')({ host: '127.0.0.1', port: 6379 });
In my app.js . first I
var Server = require('socket.io'); var io = new Server(30134); var redis = require('socket.io-redis');
io.adapter(redis({ host: '127.0.0.1', port: 6379 }));
and then
app.get("/ts", function (req, res) { var io = require('socket.io-emitter')(); // setInterval(function(){ // io.emit('time', new Date); // }, 5000);
});
The program get me an errror
mossing redis 'host' at new Emitter \node_modules\socket.io-emiiter\index.js 53:43