NODE JS

How to make server in node js || How to define port for create node server

  • Neel Bhardwaj

  • 15-Jan-2022

  • 0 comments

  • 160

http = pre install node module.

req = Its 2 call back parameter. First represent request send to server.

res = In this server send response.

var http = require('http');

http.createServer(function(req,res){

    res.write('Display data u want.');

    res.end();

}).listen(3000)

"Programming isn't about what you know,
it's about what you can figure out.”
Chris Pine

Neel Bhardwaj

A full stack developer. I have a Passion for Creating Clean, Beautiful, Interactive, Minimalistic, Responsive and User Friendly website, Developed by Modular, Scalable and Functional Code.

Recent comments

Leave a reply