feat(smartpdf): replace internal Express server with @push.rocks/smartserve, add PDF→WebP rendering, improve start/stop handling and bump dependencies
This commit is contained in:
@@ -73,7 +73,7 @@ interface IPdf {
|
||||
|
||||
## 📚 How It Works
|
||||
|
||||
SmartPDF spins up a lightweight Express server bound to `localhost` and a headless Chromium browser. When you call a generation method:
|
||||
SmartPDF spins up a lightweight HTTP server (via `@push.rocks/smartserve`) bound to `localhost` and a headless Chromium browser. When you call a generation method:
|
||||
|
||||
1. Your HTML is registered internally and served at `http://localhost:{port}/{id}`
|
||||
2. Puppeteer navigates to that URL, waits for the page to fully render, and captures a PDF
|
||||
@@ -362,7 +362,7 @@ await Promise.all(instances.map(i => i.stop()));
|
||||
|
||||
| Property | Type | Description |
|
||||
|----------|------|-------------|
|
||||
| `serverPort` | `number` | The port the internal Express server is listening on |
|
||||
| `serverPort` | `number` | The port the internal HTTP server is listening on |
|
||||
|
||||
#### Instance Methods
|
||||
|
||||
|
||||
Reference in New Issue
Block a user