Registry / devops / yog-bigpipe

yog-bigpipe

JSON →
library0.4.0jsnpmunverified

An express.js middleware for fis widget pipline output, enabling BigPipe-style chunked rendering for web pages. Version 0.4.0 is the latest stable release but appears to be in maintenance mode with no recent updates. It is designed to work with the yog framework and fis build tool. Unlike standalone BigPipe libraries, yog-bigpipe integrates tightly with fis widgets and express to allow asynchronous loading of pagelets, improving perceived performance. It relies on the yog middleware and fis template system, making it less suitable for projects not using those tools.

npm install yog-bigpipe
INSTALL
IMPORT
SIG · YOG-BIGPIPE
Y
yog-bigpipe
devopsjavascriptv0.4.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

default
import yogBigpipe from 'yog-bigpipe'
const yogBigpipe = require('yog-bigpipe')
Main package export is a middleware function for express.
res.bigpipe.bind
router.get('/', (req, res) => { res.bigpipe.bind('id', (setter) => { ... }); res.render('view'); })
res.bigpipe('id', callback) instead of .bind()
The correct method is .bind() on res.bigpipe, not direct invocation.
BigPipe class (if exported)
import { BigPipe } from 'yog-bigpipe'
const BigPipe = require('yog-bigpipe').BigPipe
If using TypeScript, check if BigPipe is a named export; otherwise default import is fine.

Sets up an Express app with yog-bigpipe middleware, binds async data to a pagelet, and renders a template with BigPipe chunked output.

import express from 'express'; import yogBigpipe from 'yog-bigpipe'; const app = express(); // Use middleware (must be before routes) app.use(yogBigpipe()); app.set('view engine', 'tpl'); // assuming fis/swig app.get('/', (req, res) => { // Bind async data for a pagelet with id 'jumbotron' res.bigpipe.bind('jumbotron', (setter) => { setTimeout(() => { setter(null, { asyncData: 'Hello from BigPipe!' }); }, 1000); }); // Render template that includes async widget res.render('page/index.tpl'); }); app.listen(3000, () => console.log('Server running on port 3000'));
Debug
Known issues
deprecatedyog-bigpipe is part of the yog framework which is considered legacy. Use modern server-side rendering approaches (e.g., streaming SSR) instead.
fix
Consider migrating to a modern framework like Next.js or using express-stream for streaming responses.
affects: *
gotchaThe middleware must be used before any route handlers that call res.render() with BigPipe templates. Otherwise res.bigpipe will be undefined.
fix
Ensure app.use(yogBigpipe()) is placed before route definitions.
affects: *
gotchaThe callback to res.bigpipe.bind receives a setter function that follows Node.js error-first convention (err, data). Forgetting to call setter() will hang the response.
fix
Always invoke setter(null, data) or setter(error) inside the callback to complete the pagelet.
affects: *
breakingyog-bigpipe relies on fis template engine and is not compatible with standard express view engines. Migrating templates requires significant changes.
fix
Only use this package with fis-based template pipelines or rewrite templates to use a different engine.
affects: *
gotchaThe middleware expects the request object to have a bigpipe property. If you modify req in other middleware, ensure compatibility.
fix
Avoid overriding req.bigpipe before routes that use BigPipe.
affects: *
Errors
Common errors & fixes
Cannot read property 'bind' of undefined
yog-bigpipe middleware not installed before route handler.
fix
Call app.use(yogBigpipe()) before defining routes.
setter is not a function
Invoking res.bigpipe.bind with a callback that doesn't receive setter as first parameter, or calling setter before it's defined.
fix
Ensure callback signature is (setter) => { setter(null, data); }.
Error: render function not found
Template engine not configured for fis; yog-bigpipe expects fis template rendering.
fix
Set up fis view engine or use res.send instead of res.render.
Upgrade
Version history
0.4.0latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
19 hits · last 30 days
node
16
Resources