1.0.4 • Published 8 years ago

koa-body-res v1.0.4

Weekly downloads
2
License
ISC
Repository
github
Last release
8 years ago

Format koa's respond json.

Installation

$ npm install koa-body-res

Use with koa

var app = require('koa')();
var koaRes = require('koa-body-res');
app.use(koaRes());

this.data = 'This is a body';
this.msg = 'This is a msg';

output

this.body = {
	code: 200,
	data: 'This is a body',
	msg: 'This is a msg'
}

作者官网: http://www.wemallshop.com

1.0.4

8 years ago

1.0.3

8 years ago

1.0.2

8 years ago

1.0.1

8 years ago

1.0.0

8 years ago