mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-10-04 14:57:10 +00:00
Update koa-hbs test file
This commit is contained in:
@@ -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!'
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user