1. 首页
  2. 数据库
  3. 其它
  4. template router:基于已标记模板文字进行路由的DSL 源码

template router:基于已标记模板文字进行路由的DSL 源码

上传者: 2021-02-07 19:48:22上传 ZIP文件 59.67KB 热度 11次
模板路由器 使用标记的模板文字为Express,koa-router或类似的路由定义路由。 例 const express = require ( 'express' ) ; const routes = require ( 'template-router' ) ; const app = express ( ) ; routes ( app ) ` GET /hello/:name ${ function sayHello ( req , res ) { const name = req . params . name ; res . send ( `
下载地址
用户评论