carbone-connect
This package allows you to use a remote carbone server like the one provided by carbone-docker.
Installation
yarn add carbone-connect
Or
npm install --save carbone-connect
Then in your code :
const carbone = `http://carbone-docker-container`; // Use carbone as usual...
Usage
This package exposes the same API than the original Carbone.io package with some additions.
Additions
Promise addition
If no callback is provided to carbone.render()
then a Promise is returned
Legacy usage
carbone);
Promise usage
carbone;
async/await
usage
const report = await carbone;
Stream addition
When you use Express and want to return the generated report you can speedup the process by using carbone.renderStream()
method.
Example
app;