Skip to content

Commit

Permalink
revert to everyone.on vs. nowjs.on for connect/disconnect
Browse files Browse the repository at this point in the history
  • Loading branch information
ericz committed Jun 30, 2011
1 parent ae6d8dc commit df6fd50
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions examples/express_example/app.js
Expand Up @@ -31,12 +31,12 @@ console.log("Express server listening on port %d", app.address().port);
var nowjs = require('now');
var everyone = nowjs.initialize(app);

nowjs.connected(function(){
everyone.connected(function(){
console.log("Joined: " + this.now.name);
});


nowjs.disconnected(function(){
everyone.disconnected(function(){
console.log("Left: " + this.now.name);
});

Expand Down
4 changes: 2 additions & 2 deletions examples/multiroomchat_example/multiroomchat_server.js
Expand Up @@ -13,14 +13,14 @@ var nowjs = require("../../");
var everyone = nowjs.initialize(server);


nowjs.on('connect', function(){
everyone.on('connect', function(){
this.now.room = "room 1";
nowjs.getGroup(this.now.room).addUser(this.user.clientId);
console.log("Joined: " + this.now.name);
});


nowjs.on('disconnect', function(){
everyone.on('disconnect', function(){
console.log("Left: " + this.now.name);
});

Expand Down

0 comments on commit df6fd50

Please sign in to comment.