1.0.0 • Published 11 years ago
express-json v1.0.0
express-json
A middleware for Express
that sets Content-Type
to text/plain
if Accept
header doesn't
contain application/json
.
Installation
$ npm install express-json
Usage
var express = require('express'),
json = require('express-json');
var app = express()
.use(json())
.use(function (req, res) {
res.json({
helloWorld: 'Hello World!'
});
})
.listen(3000);