Im trying to just stop the post request after I\'ve saved a document to the DB, ie:
app.post(\'/blah\'), function(req,res){
//my code does a bunch of stuff
While you can use the underlying end method borrowed from Node's http module, Express.js has its own send method that calls end when appropriate:
/**
* Send a response.
*
* Examples:
*
* res.send(new Buffer('wahoo'));
* res.send({ some: 'json' });
* res.send('some html
');
* res.send(404, 'Sorry, cant find that');
* res.send(404);
*
* @param {Mixed} body or status
* @param {Mixed} body
* @return {ServerResponse}
* @api public
*/
res.send = function(body){
.
.
.
// respond
this.end(head ? null : body);
return this;
};