考阿视图
用于koa的模板渲染中间件(使用 )。
安装
$ npm install koa-view
const view = require ( 'koa-view' ) ;
// Must be used before any router is used
app . use ( view ( __dirname + '/views' ) ) ;
app . use ( async function ( ctx ) {
ctx . state = {
session : ctx . session ,
title : 'app'
} ;
await ctx .
评论0
最新资源