Created
September 22, 2016 14:49
-
-
Save techbyvideo/3f2d38f998b7fa72b04ba8d7325985b0 to your computer and use it in GitHub Desktop.
Revisions
-
techbyvideo created this gist
Sep 22, 2016 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,20 @@ //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!'); });