Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mdimai666/micromq-pug-render
package for add res.render('view', data)
https://github.com/mdimai666/micromq-pug-render
Last synced: 18 days ago
JSON representation
package for add res.render('view', data)
- Host: GitHub
- URL: https://github.com/mdimai666/micromq-pug-render
- Owner: mdimai666
- License: mit
- Created: 2020-01-02T08:22:21.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2021-08-11T20:40:20.000Z (over 3 years ago)
- Last Synced: 2024-12-17T18:50:42.091Z (27 days ago)
- Language: JavaScript
- Size: 41 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[![micromq](https://img.shields.io/npm/v/micromq-pug-render.svg?style=flat-square)](https://www.npmjs.com/package/micromq-pug-render/)
# micromq-pug-render
Extend of [https://github.com/micromq/micromq](https://github.com/micromq/micromq) library add res.render('view', data) function
## Install
```sh
$ npm i micromq-pug-render
```## Usage
```js
res.render('index', { title: 'My Title' });
```## Examples
```js
const MicroMQ = require('micromq');
const pug_render = require('micromq-pug-render');const mq = new MicroMQ(...)
const path_views = __dirname + '/views/';
mq.use(pug_render({ path_views: path_views }));
//...
mq.all('/', (req,res,next) => {
res.render('index', { title: 'My Title' });
});```
## Lience
The package is open-sourced software licensed under the [MIT license](https://opensource.org/licenses/MIT)