1.2.2 • Published 5 months ago
koa-router-api-build v1.2.2
适用于koa-joi-router,koa-router
用于动态生成router路由
类型导出
使用demo如下
在api文件夹所在同级目录新建genkey.js文件,内容如下:
// genkey.js
import {ApiBuild} from "koa-router-api-build"
import path from "path"
import { fileURLToPath } from 'url';
import { dirname } from 'path';
const __filename = fileURLToPath(import.meta.url);
const __dirname = dirname(__filename);
async function genRouters () {
const root = path.resolve(__dirname, "./api")
const ab = new ApiBuild(root)
await ab.genApis()
console.log(ab.apis)
return ab.apis
}
genRouters ()
1.2.2
5 months ago
1.2.1
5 months ago
1.1.21
5 months ago
1.1.16
5 months ago
1.1.19
5 months ago
1.1.18
5 months ago
1.1.17
5 months ago
1.1.20
5 months ago
1.1.12
5 months ago
1.1.11
5 months ago
1.1.15
5 months ago
1.1.13
5 months ago
1.1.1
6 months ago
1.1.0
6 months ago
1.1.9
6 months ago
1.1.8
6 months ago
1.1.7
6 months ago
1.1.6
6 months ago
1.1.5
6 months ago
1.1.3
6 months ago
1.1.2
6 months ago
1.0.11
6 months ago
1.0.10
6 months ago
1.0.12
6 months ago
1.0.9
6 months ago
1.0.8
6 months ago
1.0.7
6 months ago
1.0.6
6 months ago
1.0.5
6 months ago
1.0.3
6 months ago
1.0.2
6 months ago
1.0.1
6 months ago
1.0.0
6 months ago