Skip to content
Browse files

clean

  • Loading branch information...
1 parent 3768903 commit 7a5c45876c9ef0928b8d27f6ea438a45de246db9 @chrisrhoden committed Apr 7, 2012
Showing with 3 additions and 3 deletions.
  1. +3 −3 server.js
View
6 server.js
@@ -17,7 +17,7 @@ app.get('/', function(req, res) {
});
app.get('/mobile', function(req, res) {
- res.render('mobile.ejs', {title:"mobile!", sessionId:req.params['session_id'] || '0' });
+ res.render('mobile.ejs', {title:"mobile!", sessionId:req.query.session_id || '0' });
});
@@ -29,8 +29,8 @@ io.sockets.on('connection' , function (socket) {
socket.on('newClient', function(callback) {
var sessionId = sessions.length;
- sessions.push({id:sessionId, browserSocket:socket, bookmarks:[]});
- session = sessions[sessionId];
+ session = sessions[sessionId] = {id:sessionId, browserSocket:socket, bookmarks:[]};
+
callback(sessionId);
});

0 comments on commit 7a5c458

Please sign in to comment.
Something went wrong with that request. Please try again.