Connect ECONNREFUSED 127.0.0.1:3000

const http = require(‘http’);

const hostname = ‘localhost’;
const port = 3000;

const server = http.createServer((req,res) => {
console.log(req.header);

res.statusCode = 200;

res.setHeader('Content-Type' , 'text/html');
res.end('<html><body<h1>Hello World!</h1></body></html>');

})

server.listen(port,hostname,() => {
console.log(Server running as http://${hostname}:${port/});
});

2020-12-20T18:30:00Z

Hi @browngirl,

Welcome to the community! :clap:

Looks like you just provided some node.js code in the description. Could you provide a bit more detail about the issue you are seeing with Postman?

The title seems to indicate that Postman is having an issue connecting to the node.js service you are running, but if you can verify that and provide additional context, that would be helpful.

Best,
Orest

1 Like