Install the required modules in npm
npm install ntwitter
npm install socket.io
Enter your API keys by editing these lines:
var twit = new twitter({
consumer_key: '[YOUR KEY HERE]',
consumer_secret: '[YOUR KEY HERE]',
access_token_key: '[YOUR KEY HERE]',
access_token_secret:'[YOUR KEY HERE]'
});
You can pick what topic you are listening for by editing this line in twitter-stream.js
twit.stream('statuses/filter', {'track':'YOUR TOPIC HERE'},
If you are using windows, just run the batch file. Else:
node twitter-stream.js
nodejs twitter-stream.js