yog-bigpipe
An express.js middleware for fis widget pipline output.
This middleware is bundled in yog.
With yog you can simple use the pagelet like
this.
{% extends './layout.tpl' %}
{% block content %}
{% widget "./pagelets/jumbotron/jumbotron.tpl" id="jumbotron" mode="async" %}
{% endblock %}
And in your controller, you can assign async data like this.
router.get('/', function(req, res) {
res.bind('jumbotron', fuction(setter) {
setTimeout(function() {
setter(null, {
asyncData: 'xxx'
});
}, 2000);
});
res.render('page/index.tpl');
});
Then the jumbotron content will be rendered in chunk mode.