NODE JS

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

  • Neel Bhardwaj

  • 15-Jan-2022

  • 0 comments

  • 218

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


Fatal error: Cannot declare class Connection, because the name is already in use in /home/d8ouyzxnuef4/public_html/thecoderjob.com/cj_admin/classes/Connection.php on line 3