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
Another server is running on same port 8080, so you need to kill and start your instance.
find running instance
$ netstat -nlp | grep 8080
(Not all processes could be identified, non-owned process info
will not be shown, you would have to be root to see it all.)
tcp6 0 0 :::8881 :::* LISTEN 28207/node
kill existing server instance using pid
$ kill -9 28207
start instance
$ node server.js