The get method was working until I added the extra code:

```
var io = require('socket.io');
var express = require('express');
var app = express();
var fs = require('fs');

var http = require("http"),
    faroo_api = 'hidden',
    url = "http://www.faroo.com/api?q=knicks&start=1&length=10&l=en&src=news&f=json&key=";

var request = http.get(url + faroo_api, function (err, response) {    
    var buffer = "", 
        data;

    if(err){
        console.log("there was an error");
    }
    response.on("data", function (chunk) {
        buffer += chunk;
    }); 

    response.on("end", function (err) {
        data = JSON.parse(buffer);
        console.log(data);
    }); 
}); 

var serv = http.createServer(function(request, res){
    fs.readFile(__dirname + '/text.html', function(err, data){
        if(err){
            res.writeHead(500, {'Content-Type': 'text/plain'});
            return res.end('Error');
        }
        res.writeHead(200, {'Content-Type': 'text/html'});
        res.end(data);
    });
});
serv.listen(8000);

var serv_io = io.listen(serv);
serv_io.on('connection', function(socket){
    socket.emit('messages', data);
});

```

now its giving this error message. I'm not sure what's going wrong. I'm guessing the response is being blocked by something but i'm not sure.

```
there was an error
/Users/AmmarKarim/Desktop/Apps/Projectapp/app.js:21
    response.on("data", function (chunk) {
             ^
TypeError: Cannot call method 'on' of undefined
    at ClientRequest.<anonymous> (/Users/AmmarKarim/Desktop/Apps/Projectapp/app.js:21:14)
    at ClientRequest.g (events.js:180:16)
    at ClientRequest.emit (events.js:95:17)
    at HTTPParser.parserOnIncomingClient [as onIncoming] (http.js:1693:21)
    at HTTPParser.parserOnHeadersComplete [as onHeadersComplete] (http.js:122:23)
    at Socket.socketOnData [as ondata] (http.js:1588:20)
    at TCP.onread (net.js:528:27)

```

let me know if you need the html.