how to send response in express js

Solutions on MaxInterview for how to send response in express js by the best coders in the world

showing results for - "how to send response in express js"
Tim
26 Aug 2019
1(req, res) => res.send('Hello World!')
2//Use end() to send an empty response
3res.end()
4res.status(404).end()// for not found pages
5//use either
6//res.status(404).send('File not found') === res.sendStatus(404)