1.0.0 • Published 5 years ago
egg-params v1.0.0
egg-params
Install
$ npm i egg-params --saveUsage
// {app_root}/config/plugin.js
exports.params = {
enable: true,
package: 'egg-params',
};Configuration
// {app_root}/config/config.default.js
exports.middleware = ['before', 'params', 'after']see config/config.default.js for more detail.
Example
async find() {
const { ctx } = this
ctx.body = await ctx.service.account.find(ctx.params)
}Questions & Suggestions
Please open an issue here.
License
1.0.0
5 years ago