我有一个在8082上运行的快速REST应用程序。然后,我尝试使用请求从我的另一个应用程序中调用:
request.post({
url: 'http://localhost:8082/test',
method: 'POST',
json: {
code: 'Hello'
}
}, (err, res, body) => {
console.log(err)
console.log(res)
console.log(body)
})但是我得到了一个502 Bad Gateway错误:
<html>
<head><title>502 Bad Gateway</title></head>
<body bgcolor="white">
<center><h1>502 Bad Gateway</h1></center>
<hr><center>nginx/1.10.1</center>
</body>
</html>它看起来像是在调查Nginx,而不是高速公路吗?
我怎么能强迫它查看我运行的应用程序呢?
发布于 2016-10-31 15:37:04
检查正确端口的其他应用程序代码,如果nginx正在监听该端口,则更改端口。
https://stackoverflow.com/questions/40345459
复制相似问题