Skip to content

koexjs/ejs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ejs

NPM version Coverage Status Dependencies Build Status license issues

ejs for koa extend.

Install

$ npm install @koex/ejs

Usage

// 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');
});

Related