template router:基于已标记模板文字进行路由的DSL 源码
模板路由器 使用标记的模板文字为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 ( `
下载地址
用户评论