DockerRestApi/routes/status.js
2019-09-19 18:07:12 +02:00

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;