NodeJs Server
const http = require('http');
//require the http module
const port = 4500 ;
// assign the port
//create a server then using res write on the web page
const server = http.createServer((rej,res)=>{
res.write("hellow");
res.end();
//end the server
})
//listen on port
server.listen(port , ()=>{
console.log(`server started on port :${port}`);
})
Comments
Post a Comment