As a developer I wanted to create a simple service which creates dynamic websites and have them easily sharable via screenshots and PDF. I could have created a simple NodeJS application (like described in this article) just to solve the problem at a time but thought: “Why do I not make it a simple service?”.

The basics — a simple NodeJS application spawning a puppeteer controlled headless browser to capture screenshots and images from a website — where already in place, but now I wanted to make it a bit more versatile and consumable.

What is a bit more?

  • A simple and straightforward API
  • Param validation
  • Documentation
  • Testing
  • Security considerations
  • Docker Images
  • Simple deployment to e.g. Heroku

#software #nodejs #scraping #javascript

Use Puppeteer and Nodejs to Take Screenshots and PDFs 
17.10 GEEK