resvelope
v1.0.2
Published
(Res)ponse En(velope)
Downloads
3
Readme
(Res)ponse En(velope)
=========
Express middleware to automatically wrap responses in an envelope when query parameter envelope
(overridable) is true.
{
"status": 404,
"data": "Not Found",
"headers": {...}
}
Usage
$ npm install resvelope --save
var express = require('express');
var app = express();
app.use(require('resvelope')({ //opts }));
Options
- param: Set this equal to the desired query string parameter which will be used to determine if the response will be wrapped in an envelope. Default:
envelope