I have the following code in a file called server.js.
var http = require(\'http\'); http.createServer(function (request, response) { response.writeHead(200,
I used the node.js command prompt, instead of the windows default command prompt and it worked for me. Did not know why it did't work in the windows default command prompt.