0.0.9 • Published 4 years ago

koa-liquidjs v0.0.9

Weekly downloads
11
License
ISC
Repository
-
Last release
4 years ago

koa-liquidjs implements a wrapper around the liquidjs package, making it simple to start working with view templates in Koa.

Install via npm:

npm i koa-liquidjs.

Basic example:

const Koa =  require('koa');
const KoaLiquid =  require('koa-liquidjs');
const app =  new  Koa();
const engine =  new  KoaLiquid('./views/');

app.use(async (ctx, next) => {
  ctx.body =  await engine.render('test', {
    hello_world: 'Hello world!'
  });
});

app.on('error', (error) => {
  console.error(error);
});

app.listen(3000);

For options see liquidjs options.

0.0.9

4 years ago

0.0.8

4 years ago

0.0.7

4 years ago

0.0.6

4 years ago

0.0.5

4 years ago

0.0.4

4 years ago

0.0.3

4 years ago

0.0.2

4 years ago

0.0.1

4 years ago