I'm trying to request
using the library superagent on my server nodejs
, I'm following the documentation, however, is not working. Here's my code nodejs
:
var express = require('express');
var app = express();
var request = require('superagent');
app.set('port', (process.env.PORT || 5006));
request
.get('http://www.google.com.br')
.end(function(err, res){
});
app.listen(app.get('port'), function() {
console.log('Node app is running on port', app.get('port'));
});
Follow the documentation link for superagent
:
Can anyone help me with what I'm doing wrong in this request
?