Skip to content

Commit

Permalink
Fix for #1: Updated to recent versions of node and express
Browse files Browse the repository at this point in the history
  • Loading branch information
dethe committed Jul 14, 2013
1 parent 1f8a94b commit 1718d89
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
9 changes: 6 additions & 3 deletions app.js
Expand Up @@ -16,7 +16,9 @@
UUID = require('node-uuid'),

verbose = false,
app = express.createServer();
http = require('http'),
app = express(),
server = http.createServer(app);

/* Express server set up. */

Expand All @@ -26,13 +28,14 @@
//so keep this in mind - this is not a production script but a development teaching tool.

//Tell the server to listen for incoming connections
app.listen( gameport );
server.listen(gameport)

//Log something so we know that it succeeded.
console.log('\t :: Express :: Listening on port ' + gameport );

//By default, we forward the / path to index.html automatically.
app.get( '/', function( req, res ){
console.log('trying to load %s', __dirname + '/index.html');
res.sendfile( __dirname + '/index.html' );
});

Expand Down Expand Up @@ -60,7 +63,7 @@
//This way, when the client requests '/socket.io/' files, socket.io determines what the client needs.

//Create a socket.io instance using our express server
var sio = io.listen(app);
var sio = io.listen(server);

//Configure the socket.io connection settings.
//See http://socket.io/
Expand Down
6 changes: 3 additions & 3 deletions package.json
Expand Up @@ -5,11 +5,11 @@
"license": "MIT",
"version": "1.0.0",
"dependencies": {
"express": "2.5.x",
"express": "3.3.x",
"socket.io": "0.9.x",
"node-uuid": "1.3.3"
},
"engine": {
"node": "0.6.x"
"node": "0.10.x"
}
}
}

0 comments on commit 1718d89

Please sign in to comment.