var client = require("jsreport-client")(url, username, password);
client
.render({template: {...}}, {timeout: 1000})
.then( (response) => {
return response.pipe(res); // res is Express response
})
.catch((err) => {
console.log(err);
return next(err); //Express error handler
});
Any plans on adding Promises to nodejs-client?
Example: