Created
April 8, 2012 17:03
-
-
Save 3rd-Eden/2338492 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"use strict"; | |
var connect = require('connect') | |
, app = connect.createServer(connect.static(__dirname)) | |
, tweet = require('./tweet').stream; | |
var io = require('socket.io').listen(app); | |
app.listen(8080); | |
io.sockets.on('connection', function (socket) { | |
socket.on('ping', function () { | |
socket.emit('pong'); | |
console.log(arguments); | |
}); | |
}); | |
tweet('web5,html5,javascript,nodejs', function (data) { | |
io.sockets.send(data); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment