1.0.0 • Published 10 years ago
connect-send-json v1.0.0
connect-send-json
Adds the response.json()
middleware to connect and connect-like http stacks.
Usage
'use strict';
var connect = require('connect')
, app = connect()
, send = require('connect-send-json')
;
app
.use(send.json())
.use(function (req, res) {
res.statusCode = 501;
res.json({
error: { message: "Not Implemented" }
});
})
;
module.exports = app;
1.0.0
10 years ago