@zcorky/koa-ejs
v0.0.1
Published
ejs for koa
Downloads
3
Readme
koa-ejs
ejs for Koa, wrapper with ejs.
Install
$ npm install @zcorky/koa-ejs
Usage
// See more in test
import * as path from 'path';
import ejs from '@zcorky/koa-ejs';
import * as Koa from 'koa';
const app = new Koa();
app.use(ejs({
dir: path.join(__dirname, './view'),
}));
app.use(ctx => {
ctx.render('index');
});
app.listen(8000, '0.0.0.0', () => {
console.log('koa server start at port: 8000');
});