Wednesday 26 April 2017

how to run a simple node.js file using batch file

i have one simple "Hello World" program in Node.js. i want to run this using batch file.

var http=require("http");

http.createServer(function(request,response){
        response.writeHead(200,{'Content-Type':'text/plain'});
        response.end('Hello World!..\n');
}).listen(8080);
console.log('Server running at http://127.0.0.1:8080/');


via Nagaraj P

No comments:

Post a Comment