In this article, i will create 1st Web Server.
STEPS:
Listen port
Receive Request
send response
loading static files
Http Module:
include http module
var http=require("http");
create a server
var server=http.createServer(function(request, response){
write some headers
response.writeHead(200,{"content-type":"text/plain"}};
response.end("hello");
}).listen(8000);
STEPS:
Listen port
Receive Request
send response
loading static files
Http Module:
include http module
var http=require("http");
create a server
var server=http.createServer(function(request, response){
write some headers
response.writeHead(200,{"content-type":"text/plain"}};
response.end("hello");
}).listen(8000);
0 comments:
Post a Comment