Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
app.get('/streaming', function(req, res) {
dust.stream('hello', context).pipe(res)
.on('end', function() {
console.log('Done!');
});
});
app.get('/', function (req, res) {
dust.stream("hello", {
"async": request('http://www.dustjs.com/')
}).pipe(res);
});
return function dustTemplate(shape, renderer, next) {
var stream = dust.stream(templatePath, shape)
.on('data', function(data) {
renderer.write(data);
})
.on('end', next)
.on('error', function(err) {throw err;});
stream['decent-renderer'] = renderer;
};
}