hapi testing
✓ Published0🌍 Public
TTBD
Last edited Feb 6, 2015
Created on Feb 6, 2015
This example shows a Hapi server that fetches the Google homepage, converts its HTML to a PDF document, and returns it as the HTTP response. The server defines a single GET route on the root path, which chains together the `request-promise` library for the external HTTP request with the `html-pdf` library to generate the PDF buffer. The handler asynchronously resolves the PDF buffer and replies with the correct `application/pdf` content type, demonstrating a server-side data conversion and delivery pipeline.
AI-generated description