从部署在heroku上的节点服务器呼叫另一台服务器会出现超时错误

时间:2019-01-17 16:27:56

标签: node.js express heroku

我已经在Heroku上部署了一个快递服务器,当我尝试对任何其他服务器进行get呼叫时,都会出现此错误
    错误:连接ETIMEDOUT 192.225.208.117:443             在Object._errnoException(util.js:992)             在_exceptionWithHostPort(util.js:1014)             在TCPConnectWrap.afterConnect上[作为oncomplete](net.js:1186)

下面是我正在尝试的代码

app.get('/',function(req,res,next){
        axios.get("http://www.example.com")
            .then((data)=>{
                res.send(data.data)
            })
            .catch((error)=>{
                res.send(error);
            })  

});

0 个答案:

没有答案