Apply this middleware to display context information in the response to a failed request.
Currently we support these two HTTP frameworks:
- Express
- Koa
Express
var stack = require('stack-middleware').express;
var app = express();
app.use(stack());
Koa
var stack = require('stack-middleware').koa;
var app = new Koa();
app.use(stack());
The following configuration options are available:
{
disabledForXHR: true // Disable the middleware for XHR requests
}