0.4.0 • Published 5 years ago
yion-pug v0.4.0
YION PUGJS PLUGIN
A Pugjs plugin for framework Yion
Install
$ npm install --save yion-pug
Usage
const { createServer, createApp } = require('yion');
const pugRender = require('yion-pug');
const app = createApp();
const server = createServer(app, [pugRender]);
app.get('/', (req, res) => {
res.render('home.pug', { name: 'John' });
});
API reference
Response render method :
render(filepath, options = {}, status = 200)
: render file template with Pugjs