Answers for "how to send response in express js"

0

how to send response in express js

(req, res) => res.send('Hello World!')
//Use end() to send an empty response
res.end()
res.status(404).end()// for not found pages
//use either
//res.status(404).send('File not found') === res.sendStatus(404)
Posted by: Guest on August-19-2021

Code answers related to "how to send response in express js"

Code answers related to "Javascript"

Browse Popular Code Answers by Language