Node.js http-proxy-middleware request Agent connectrefuse

two node.js services are started. Service A forwards the request to B, and the
An agent is configured as follows:
var proxy = require ("http-proxy-middleware");
app.use (" / api",proxy ({

)
target:"http:192.168.10.111:3000",
secure:false,
changeOrigin: true

}));
result forwarding is An error Error occurred while trying to proxy request / api/2018-06-13 from localhost:4001 to http:192.168.10.111 : 3000 (ECONNREFUSED)

Mar.19,2021

target is misspelled. I've been doing it for a long time

.
Menu