@zcorky/koa-ejs
TypeScript icon, indicating that this package has built-in type declarations

0.0.1 • Public • Published

koa-ejs

NPM version Coverage Status Dependencies Build Status license issues

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

Related

Readme

Keywords

none

Package Sidebar

Install

npm i @zcorky/koa-ejs

Weekly Downloads

0

Version

0.0.1

License

MIT

Unpacked Size

7.1 kB

Total Files

5

Last publish

Collaborators

  • uniquecolesmith