yeps-views-template
v1.0.0
Published
YEPS React Template
Downloads
2
Maintainers
Readme
YEPS Views Template
YEPS Template rendering
How to install
npm i -S yeps-views-template
How to use
own_template_system.js
const template = require('yeps-views-template');
const view = require('template_system');
module.exports = (viewsPath, options = {}) => async context => {
return template(context, async (path, parameters) => view(viewsPath, options)(path, parameters));
};
app.js
const App = require('yeps');
const views = require('own_template_system');
const app = new App();
app.all([
views(__dirname + '/views');
]);
app.then(async ctx => {
return ctx.render('index.tpl', { text: 'Hello!' });
});
Links
- yeps - YEPS
- yeps-promisify - YEPS kernel
- yeps-benchmark - performance comparison koa2, express and node http
- yeps-router - YEPS promise based router
- yeps-error - YEPS 404/500 error handler
- yeps-redis - YEPS promise based redis client
- yeps-mysql - YEPS promise based mysql client
- yeps-boilerplate - YEPS app boilerplate
- yeps-express-wrapper - YEPS express wrapper
- yeps-cors - YEPS CORS
- yeps-bodyparser - YEPS body parser
- yeps-views - YEPS Template
- yeps-method-override - YEPS method override
- yeps-views-react - YEPS Template React