Answers for "send data to user node"

0

send data to user node

var http = require('http');
var data = "data to send to client";
var server = http.createServer(function (request, response) {
    response.writeHead(200, {"Content-Type": "text/plain"});
    response.write(data); // You Can Call Response.write Infinite Times BEFORE response.end
    response.end("Hello World\n");
}).listen(8080);
Posted by: Guest on July-12-2021

Code answers related to "Javascript"

Browse Popular Code Answers by Language