Koa-Rest-Controller: Simplified Koa.js Controller Framework

Koa-Rest-Controller is a straightforward tool for constructing Koa.js controllers, akin to Laravel controllers. It requires Node.js version 8 or higher. Installation can be done via yarn add koa-rest-controller. To use, assign an object to define your Koa-Router routes. For example:

const rest = require('koa-rest-controller');
const controller = {
  index(ctx) {},
  store(ctx) {},
  // ...
};
rest({ resource: controller });
zip
koa-rest-controller-master.zip 预估大小:10个文件
folder
koa-rest-controller-master 文件夹
file
.gitignore 914B
file
.eslintrc 38B
file
package.json 511B
file
.travis.yml 152B
file
LICENSE 1KB
file
index.js 3KB
file
README.md 1KB
file
.eslintignore 5B
folder
test 文件夹
file
index.js 4KB
file
yarn.lock 45KB
zip 文件大小:18.26KB