Search
 
SCRIPT & CODE EXAMPLE
 

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"));
Comment

PREVIOUS NEXT
Code Example
Javascript :: string into json javascript 
Javascript :: 2d array in js 
Javascript :: Fetching data with React hooks and Axios 
Javascript :: find an object from array of objects javascript 
Javascript :: how-to-reset-a-form-using-jquery 
Javascript :: palindrome javascript 
Javascript :: es6 functions 
Javascript :: react native firebase email verification 
Javascript :: difference let and var 
Javascript :: Check if an array contains a object in javascript 
Javascript :: axios response.json 
Javascript :: form submit not reaload 
Javascript :: how to find unique values in an array in js using function 
Javascript :: javascript add days 
Javascript :: how to make a grocery list in javascript 
Javascript :: javascript module pattern 
Javascript :: call multiple functions onclick react 
Javascript :: js date to timestamp 
Javascript :: Substring in Javascript using substring 
Javascript :: readfilesync buffer 
Javascript :: react time input 
Javascript :: reverse a string while keeping spaces in javascript 
Javascript :: get id value jquery 
Javascript :: js convert string to date 
Javascript :: context api react 
Javascript :: javascript date parse yyyy-mm-dd 
Javascript :: context hook 
Javascript :: remove the first item from an array 
Javascript :: get local year in js 
Javascript :: react arrow function component 
ADD CONTENT
Topic
Content
Source link
Name
8+4 =