I have written a simple code and save it in file try.js .
var http = require(\'http\'); var makeRequest = function(message) { var options = { host: \'loca
This is happening because nothing is listening on localhost:8080. Here are the examples how to handle request errors How to catch http client request exceptions in node.js