16 lines
401 B
JavaScript
16 lines
401 B
JavaScript
var express = require('express'),
|
|
request = require('request');
|
|
var router = express.Router();
|
|
|
|
|
|
router.get('/', function (req, res, next) {
|
|
request('http://www.google.com', function (error, response, body) {
|
|
console.log('error:', error);
|
|
console.log('statusCode:', response && response.statusCode);
|
|
console.log('body:', body);
|
|
|
|
res.send(body);
|
|
});
|
|
});
|
|
|
|
module.exports = router;
|