koa-program/template/route/route.ts
Titor-Z 08cbf8bec4 2.0
- 使用ora 和 prompts
- 拆分结构代码,功能更加独立
- 独立的结构,可以给予其他cli作为脚手架底层使用
2021-02-17 01:49:07 +08:00

16 lines
393 B
TypeScript

import Router from "koa-router";
import { Index as IndexRoute } from "./../controller/index";
const router: Router = new Router()
router.get("/", IndexRoute.index)
router.get("/json", IndexRoute.json)
router.get("/view", IndexRoute.view)
// --------------------------------------------------
// 导出 router 规则
// --------------------------------------------------
export { router }