@zenweb/view
TypeScript icon, indicating that this package has built-in type declarations

2.4.1 • Public • Published

zenweb-view

zenweb view module

Quick start

$ npm i @zenweb/view

app/index.js

'use strict';

const { default: view } = require('@zenweb/view');
const app = module.exports = require('zenweb').create();

app.setup(view());

app.boot().then(() => {
  app.router.get('/', ctx => {
    return ctx.render('index', {
      name: 'world',
    });
  });
  app.listen();
});

app/view/index.njk

<h1>Hello {{name}}</h1>

Package Sidebar

Install

npm i @zenweb/view

Weekly Downloads

0

Version

2.4.1

License

MIT

Unpacked Size

5.26 kB

Total Files

6

Last publish

Collaborators

  • yefei777