Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Doesn't get responce #40

Closed
baio opened this Issue Jun 27, 2011 · 3 comments

Comments

Projects
None yet
2 participants

baio commented Jun 27, 2011

Hi.

When I run simple example which I copied from examples section on c9.io server all works fine, but when I run the same code on my own bitnami server, it doesn't get response but also doesn't throw any exceptions.

What clould be problem here, any suggestion? Maybe I should open some port for proper work of request module?

Owner

mikeal commented Jun 27, 2011

which example? can you paste the code and any exception information in to the ticket.

baio commented Jun 27, 2011

Example works on c9.io, not work on bitnami

var http, s;

http = require('http');
request = require('request');

s = http.createServer(function(req, res) {

    request({url:'http://www.google.com'}, function (error, response, body) {

        if (!error && response.statusCode == 200) {

            res.writeHead(200, {
              'Content-Type': 'text/plain'
            });
            res.end('ok\n');              
        }

      });

});

s.listen(8087);

baio commented Jun 27, 2011

Sorry!!! Something wrong with my server, have teted now once again and it's work! Any suggestions why it could be so?

@baio baio closed this Jun 27, 2011

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment