You can do as following:
Router
app.delete('/api/photos/:id', photos.deletePhoto);
It follows REST api norms
Exports
exports.deletePhoto = function (req, res) {
Photos.remove({_id: req.params.id}, function(err, photo) {
if(err) {
return res.send({status: "200", response: "fail"});
}
fs.unlink(photo.path, function() {
res.send ({
status: "200",
responseType: "string",
response: "success"
});
});
});
};