Docker container to render PDF files using puppeteer
docker build . -t openitcockpit/puppeteer -f Dockerfile
docker run --rm -it --init -p 8084:8084 \
-v $(pwd)/app:/app \
openitcockpit/puppeteer /bin/bash
node webservices.js
curl -X POST -H 'Content-Type: application/json' -d '{"html": "<!DOCTYPE html><html><head><title>PDF test</title></head><body><p>It works!</p></body></html>"}' http://localhost:8084/pdf --output result.pdf
https://stackoverflow.com/questions/47587352/opening-local-html-file-using-puppeteer
To debug this, open the area_chart_template.html
file in your web browser. You can use console.log and dev tools as you are used to it.