I am playing around with Nodejs and express by building a small rest API. My question is, what is the good practice/best way to set the code status, as well as the response
I am using this in my Express.js application:
app.get('/', function (req, res) { res.status(200).json({ message: 'Welcome to the project-name api' }); });