yeps-views
v0.0.1
Published
YEPS Views
Downloads
29
Maintainers
Keywords
Readme
YEPS Views
YEPS Template rendering
Template engines
YEPS Views is using consolidate under the hood.
How to install
npm i -S yeps-views
How to use
views/index.jsx
const React = require('react');
module.exports = props => <h1>{props.text}</h1>;
app.js
const App = require('yeps');
const views = require('yeps-views');
const app = new App();
app.all([
views(__dirname + '/views', { engine: 'react' });
]);
app.then(async ctx => {
return ctx.render('index.jsx', { 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-method-override - YEPS method override