【文件属性】:
文件名称:koa-struct:Koa struct中间件
文件大小:14KB
文件格式:ZIP
更新时间:2021-05-08 05:08:01
validation koa2 struct JavaScript
koa-struct
Koa struct中间件
安装
koa-struct要求
koa2
考阿体
路由器
npm install koa-struct --save
例子
基本用法
const struct = require ( 'koa-struct' ) ;
const body = require ( 'koa-body' ) ;
const Router = require ( 'koa-router' ) ;
const koa = require ( 'koa' ) ;
const app = new koa ( ) ;
const router = new Router ( ) ;
app
. use ( body ( ) )
. use ( struct ( ) )
. use ( router . routes ( ) )
. us
【文件预览】:
koa-struct-master
----.gitignore(987B)
----package.json(1KB)
----package-lock.json(30KB)
----.travis.yml(34B)
----index.js(1KB)
----CHANGELOG.md(454B)
----README.md(2KB)
----.npmignore(987B)
----test()
--------index.js(4KB)