1.0.0 • Published 3 years ago

egg-params v1.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

egg-params

NPM version build status Test coverage David deps Known Vulnerabilities npm download

Install

$ npm i egg-params --save

Usage

// {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

MIT