ejs for koa extend.
$ npm install @koex/ejs
// See more in test
import * as path from 'path';
import ejs from '@koex/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');
});