<pre>

var http = require(“http”);
var host = “127.0.0.1”;
var port = 1337;

console.log(“Starting server…”);

var server = http.createServer(function(request, response){
console.log(“Received Request”+ request.url);
response.writeHead(200, {“Content-Type”:”text/plain”});
response.end(“Sample Response”);
});

server.listen(port, host, function(){
console.log(“Listening”+host+”:”+port);
});

</pre>

OP:

After executing this code type 127.0.0.1:1337 in Browser URL to get Response