Permalink
Browse files

Merge branch 'master' of https://github.com/misbahkhan/yt-sync

  • Loading branch information...
2 parents d0acc67 + 1ee694d commit 81a898aecc4353155517e4eea21e3b8561e2919f @Marak Marak committed Jul 6, 2012
Showing 1,189 changed files with 1,379 additions and 140,035 deletions.
View
@@ -18,5 +18,5 @@ lib-cov
pids
logs
results
-
+node_modules
npm-debug.log
@@ -2,21 +2,17 @@
var express = require("express"),
app = express.createServer(),
- io = require('socket.io').listen(app); // socket.io may listen to an http
- // or express server
+ io = require('socket.io').listen(app);
+
-// Use Express to serve static content, such as our index.html
app.configure(function(){
app.use(express.static(__dirname + '/../public'));
});
-//Socket.io emits this event when a connection is made.
io.sockets.on('connection', function (socket) {
-
- // Emit a message to send it to the client.
+
socket.emit('ping', { msg: 'Hello. I know socket.io.' });
- // Print messages from the client.
socket.on('pong', function (data) {
console.log(data.msg);
});

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.
Oops, something went wrong.

0 comments on commit 81a898a

Please sign in to comment.