Update koa-hbs test file

This commit is contained in:
mudkip
2017-02-13 19:49:34 +08:00
parent 9b396a5a42
commit 9d697c95a2
+3 -4
View File
@@ -1,16 +1,15 @@
import * as Hbs from 'koa-hbs';
import * as Koa from 'koa';
import hbs = require("koa-hbs");
import * as Path from 'path';
const app = new Koa();
const hbs = new Hbs();
app.use(hbs.middleware({
viewPath: Path.join(__dirname, './views')
}));
app.use(function *(next: any) {
yield this.render('index', {
app.use(async (ctx, next) => {
await this.render('index', {
title: 'Hello World!'
});
});