First Program

1. Example of Nodejs

console.log("welcome CTAL")

var http = require("http");

var server = http.createServer(function (request, response) {
   response.writeHead(200, {'Content-Type': 'text/plain'});
   response.end('Hello World\n');
});

server.listen(1234, function(){
// Console will print the message
console.log('Server running at http://127.0.0.1:1234/');
});

Comments