I have the below code in Nodejs and tried to execute the same through command line as well as in browser, but getting "unexpected identifier" error.
var http = require('http');
http.createServer(function(request, response) {
response.writeHead(200, {'Content-Type': 'text/html'});
response.end('<b>Running in server...</b>');
}).listen('3000', '127.0.0.1');
File name created is module3.js I am very new to nodejs. So can anyone please help me to resolve this. Thanks!!