I am using express 4 in order to create a json API service. I can\'t seem to define it to send a simple json without trying to render the view.
var express =
eventually it was the express generic catch 404's that made all the routes unvailables.
app.use(function(req, res, next) { var err = new Error('Not Found'); err.status = 404; next(err); });
removing him solved it.