0.4.0 • Published 8 years ago

yog-bigpipe v0.4.0

Weekly downloads
78
License
MIT
Repository
github
Last release
8 years ago

yog-bigpipe

Build Status Coverage Status

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) {

    // pagelet Id
    res.bigpipe.bind('jumbotron', function(setter) {

        // simulate an async progress
        setTimeout(function() {
            
            // now set data to the pagelet
            setter(null, {
                asyncData: 'xxx'
            });
        }, 2000);
    });

    res.render('page/index.tpl');
});

Then the jumbotron content will be rendered in chunk mode.

0.4.0

8 years ago

0.3.0

8 years ago

0.2.3

8 years ago

0.2.2

8 years ago

0.2.1

8 years ago

0.2.0

9 years ago

0.1.0

9 years ago

0.0.12

10 years ago

0.0.11

10 years ago

0.0.10

10 years ago

0.0.9

10 years ago

0.0.8

10 years ago

0.0.7

10 years ago

0.0.6

10 years ago

0.0.5

10 years ago

0.0.4

10 years ago

0.0.3

10 years ago

0.0.2

10 years ago

0.0.1

10 years ago