使用express和laravel代理
我正在尝试使用我的nodejs应用程序(Express)创建代理。我正在使用Express-HTTP-Proxy模块,因此我尝试使用此功能:
app.use("/w", proxy("localhost:8081", {
https: false,
}));
但是当我尝试访问页面http:// localhost:8080/w出现错误时,出现错误
Error: connect ECONNREFUSED ::1:8081
at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1195:16)
是否有人知道如何解决它,因为我无法找到任何解决请求拒绝的人
I'm trying to create a proxy with my nodejs app (express) to my laravel app. I'm using the express-http-proxy module so I tried using this function:
app.use("/w", proxy("localhost:8081", {
https: false,
}));
but when I try to access the page http://localhost:8080/w an error appears
Error: connect ECONNREFUSED ::1:8081
at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1195:16)
Does anyone know how to solve it because I can't find anyone who has solved the request rejection with laravel
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论