var config  = {user: "user", password: "pass", action: "filter", track: ['itwars','bieber','#javascript']},
sys     = require('sys');
express = require('express');
app = express.createServer();

app.configure(function(){
  app.use(express.static(__dirname + '/public'));
});
app.get('/', function(req, res, next){
  res.render('/public/index.html');
});
app.listen(8080);
console.log('Server running at http://localhost:8080/');

var socket  = require('socket.io').listen(app);
twitter     = new (require("twitter-node").TwitterNode)(config);
socket.set('log level', 1);
twitter
.addListener('error', function(error){
console.log(error.message); 
})
.addListener('tweet', function(tweet){
socket.sockets.send(JSON.stringify(tweet));
})
.addListener('limit', function(limit){
sys.puts('LIMIT: ' + sys.inspect(limit));
})
.addListener('delete', function(del){
sys.puts('DELETE: ' + sys.inspect(del));
})
.addListener('end', function(resp){
sys.puts('wave goodbye...' + resp.statusCode);
})
.stream();
<!DOCTYPE HTML>
<head>
  <meta charset="utf-8">
  <link rel="stylesheet" href="default.css">
  <title>Twitter live stream : NodeJS + Socket.io</title>
  <!--[if lt IE 9]>
  <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
  <![endif]-->
</head>
<body>
	<header>
    <h1 id="title">Twitter Streaming - Node.js - Socket.io</h1>
  </header>
  <div id="twitter-stream">
	  <ul>
	  </ul>
  </div>
  <article>
 	Really Node.JS and Socket.io rocks ! 
  </article>
  <footer>
  	Original code from http://phollow.fr - Modified by <a	href="http://www.it-wars.com" rel="follow">IT Wars</a>
  </footer>
  <script>
   (function(document, window, undefined) {
    var script = document.createElement("script");
    script.src = "http://code.jquery.com/jquery.min.js";
    script.onload = function() {
     $.getScript("http://127.0.0.1:8080/socket.io/socket.io.js", function() {
	var socket = io.connect('http://127.0.0.1:8080');
      	socket.on('message', function(json) {
	console.log("...");
	      	data = JSON.parse(json);
	      	var replacePattern = /(\b(https?|ftp):\/\/[-A-Z0-9+&@#\/%?=~_|!:,.;]*[-A-Z0-9+&@#\/%=~_|])/gim;
	      	var replacedText = (data.text).replace(replacePattern, '<a href="$1" target="_blank">$1</a>');
		$("<li></li>").html("<div class=\"g\"><div class=\"c1\">[" + data.user.screen_name + "]</div> <div class=\"c2\">▸</div> " + "<div class=\"c3\"><font color=\"red\">" + replacedText + "</font></div></div>")
          	.prependTo("ul")
          	.css({opacity:0}).slideDown("slow").animate({opacity:1},"slow");
      	});
      	socket.on("disconnect", function() {
	console.log("disconnected");
      });
     });
    };
    document.getElementsByTagName("head")[0].appendChild(script);
   })(document, window);
  </script>
  </body>
</html>