1var http = require('http');
2var data = "data to send to client";
3var server = http.createServer(function (request, response) {
4 response.writeHead(200, {"Content-Type": "text/plain"});
5 response.write(data); // You Can Call Response.write Infinite Times BEFORE response.end
6 response.end("Hello World\n");
7}).listen(8080);