On returning content
# automagically detects content and set the right headers:
res.send(returnhere)
# explicitly return json objects:
res.json(JSON.stringify(returnhere))
# you are more interested in sending http codes than actual return objects:
res.status(404).end();