9 Program to Create Own Server in NodeJS

Program:

var http = require('http');



var server = http.createServer( function(request,response){

    response.writeHead(200,{'Content-Type':'text/plain'});

    response.end('Hello There!');

});



server.listen(3000,'127.0.0.1');



Output:

 Create Own Server in NodeJS

Previous
Next Post »