Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

how to send response to client in nodejs using res object


const app = require('express')();
let text  = "Hello world";
  
app.get('/' , (req,res)=>{
   res.send(text); 
})
  
app.listen(8080 , ()=>console.log("server running"));
 
PREVIOUS NEXT
Tagged: #send #response #client #nodejs #res #object
ADD COMMENT
Topic
Name
8+4 =