Tuesday 12 November 2013

Windows 7 and NodeJs


Install NodeJs on Windows

http://nodejs.org/download/

Write your scripts:

var http = require('http');
var s = http.createServer(function(req,res){
res.writeHead(200, {'content-type':'text/plain'});
res.write("Hello");
setTimeout(function(){
res.end(" world\r\n");
},2000);
});
s.listen(8000);


Refer to nodejs.org for more information

No comments:

Post a Comment