//Library to create a web server var http = require('http'); // Create your HTTP server var server = http.createServer(function(request, response){ //Sends a response header to the request response.writeHead(200, {'Content-Type': 'text/plain'}); //This method signals to the server that all of the response headers and body have been sent response.end('TechByVideo, Hello World\n'); }); //server will be listen this port 3002 server.listen(3002, function(){ console.log('TechByVideo, Example app listening on port 3002!'); });