Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

cannot set headers after they are sent to the client mongoose

app.get('/a', (req, res) => {
  if (5 === 5) {
    return res.send('Hello');
  } else if (10 === 50) {
    return res.send('Bye');
  }

  return res.send('This also runs');
});
Source by bobbyhadz.com #
 
PREVIOUS NEXT
Tagged: #set #headers #client #mongoose
ADD COMMENT
Topic
Name
4+7 =