Skip to content

Commit

Permalink
Merge pull request #5 from nerakhon/master
Browse files Browse the repository at this point in the history
Modified JS code to handle changes in express 3
  • Loading branch information
gflarity committed Feb 20, 2013
2 parents 1cbcdc1 + ee58f57 commit 066b70b
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions heat_tracer.js
Expand Up @@ -2,15 +2,20 @@ var http = require('http');
var libdtrace = require('libdtrace');
var express = require('express');

/* create our express server and prepare to serve javascript files in ./public
/* create our express & http server and prepare to serve javascript files in ./public
*/
var app = express.createServer();
var app = express()
, http = require('http')
, server = http.createServer(app)
, io = require('socket.io').listen(server);

app.configure(function(){
app.use(express.static(__dirname + '/public'));
});

var io = require('socket.io').listen(app);

/* to decreate verbosity of socket.io
*/
io.set('log level', 1);

/* Before we go any further we must realize that each time a user connects we're going to want to
them send them dtrace aggregation every second. We can do so using 'setInterval', but we must
Expand Down Expand Up @@ -81,6 +86,6 @@ io.sockets.on('connection', function(socket) {
} );


app.listen(8000);
server.listen(8000);


0 comments on commit 066b70b

Please sign in to comment.