diff --git a/404.html b/404.html index 64eb5db..fa0ddce 100644 --- a/404.html +++ b/404.html @@ -16,7 +16,7 @@
- + \ No newline at end of file diff --git a/config/index.html b/config/index.html index 7ccb071..e07f9ac 100644 --- a/config/index.html +++ b/config/index.html @@ -19,7 +19,7 @@
Skip to content

Configuration

Configure various settings through environment variables.

General Settings

  • LOG_LEVEL: Logging level (debug, info, warn, error). Default: debug.
  • NODE_ENV: Node environment (development, production). Default: development.
  • PORT: Port number for the application to listen on. Default: 3089.
  • CACHE_CONTROL: Cache-Control header value for the responses. Default: "public, max-age=86400, immutable".

AllowBlock List

  • ALLOW_LIST: Comma-separated list of allowed domains for screenshots. If undefined or empty, all domains are allowed. Example: ALLOW_LIST=jasonraimondi.com,github.com.
  • BLOCK_LIST: Comma-separated list of restricted domains for screenshots. If undefined or empty, all domains are allowed. Example: BLOCK_LIST=localhost,google.com.

Playwright Options

  • BROWSER_TIMEOUT: Browser timeout in milliseconds for rendering. Default: 10000.
  • BROWSER_WAIT_UNTIL: Event to wait for before considering the page loaded. Valid options: 'load', 'domcontentloaded', 'networkidle'. Default: 'domcontentloaded'.

Connection Pool Options

  • POOL_IDLE_TIMEOUT_MS: Idle timeout for browser connection pool in milliseconds. Default: 15000.
  • POOL_MAX: Maximum number of connections in the browser pool. Default: 10.
  • POOL_MAX_WAITING_CLIENTS: Maximum number of waiting clients for the browser pool. Default: 50.
  • POOL_MIN: Minimum number of connections in the browser pool. Default: 2.

Default Browser Options

  • DEFAULT_WIDTH: Default width of the rendered image in pixels. Default: 250
  • DEFAULT_HEIGHT: Default height of the rendered image in pixels. Default: 250
  • DEFAULT_VIEWPORT_WIDTH: Default width of the browser viewport in pixels. Default: 1080
  • DEFAULT_VIEWPORT_HEIGHT: Default height of the browser viewport in pixels. Default: 1080
  • DEFAULT_IS_MOBILE: Whether to emulate a mobile device. Default: false
  • DEFAULT_IS_FULL_PAGE: Whether to capture the full page or clip the page at the viewport height. Default: false
  • DEFAULT_IS_DARK_MODE: Whether to request dark mode. Default: false
  • DEFAULT_DEVICE_SCALE_FACTOR: Default device scale factor (e.g., 2 for retina displays). Default: 1

Metrics and Encryption

  • METRICS: Enable or disable metrics collection. Default: false.
  • CRYPTO_KEY: Encryption key for sensitive data.

Storage Providers

The project supports multiple storage providers for caching rendered images. The storage provider can be configured using the STORAGE_PROVIDER environment variable. The available storage providers are:

Stub Storage Provider (default)

The stub storage provider is a placeholder storage provider that doesn't actually store or retrieve images, it simply logs debug messages. It can be used for testing or when storage functionality is not required.

Filesystem

The filesystem storage provider allows storing and retrieving rendered images on the local filesystem.

  • STORAGE_PROVIDER: "filesystem"
  • IMAGE_STORAGE_PATH: The directory path where images will be stored

S3

The S3 compatible storage provider allows storing and retrieving rendered images using Amazon S3.

  • STORAGE_PROVIDER: "s3"
  • AWS_BUCKET: The name of the S3 bucket to store images
  • AWS_ACCESS_KEY_ID: The AWS access key ID
  • AWS_SECRET_ACCESS_KEY: The AWS secret access key
  • AWS_DEFAULT_REGION: The AWS region for S3 (default: "us-east-1")
  • AWS_FORCE_PATH_STYLE: Set to true to use path-style URLs for S3 (default: false)
  • AWS_ENDPOINT_URL_S3: The endpoint URL for S3 (optional)

CouchDB

The CouchDB storage provider allows storing and retrieving rendered images using CouchDB.

  • STORAGE_PROVIDER: "couchdb"
  • COUCH_DB_PROTOCOL: The protocol for connecting to CouchDB (e.g., "http" or "https")
  • COUCH_DB_USER: The CouchDB username
  • COUCH_DB_PASS: The CouchDB password
  • COUCH_DB_HOST: The CouchDB host
  • COUCH_DB_PORT: The CouchDB port
  • COUCHDB_DATABASE: The name of the CouchDB database to store images (default: "images")

Released under the MIT License.

- + \ No newline at end of file diff --git a/encryption/index.html b/encryption/index.html index 1dacb51..27bc538 100644 --- a/encryption/index.html +++ b/encryption/index.html @@ -58,7 +58,7 @@ // exampleUrl: 'http://localhost:3039/?hash=str-enc:DbRfvBa61jg4FU4G75xkvVKS8g/MG2FfKfTTNwVYH4F+DpRBgDFyLyow0yOHgocpSFeFfdgJaet/JwJM+KtmuAcYbSZRJ1ENGNmcyhwZiWfhLdOAyhUlLlu8:sCzLlpiBye9ISIG3', // hash: 'str-enc:DbRfvBa61jg4FU4G75xkvVKS8g/MG2FfKfTTNwVYH4F+DpRBgDFyLyow0yOHgocpSFeFfdgJaet/JwJM+KtmuAcYbSZRJ1ENGNmcyhwZiWfhLdOAyhUlLlu8:sCzLlpiBye9ISIG3' // }

This formatted version separates the README into logical sections, making it easier to understand and follow the instructions for generating an encryption key, setting it up, and making encrypted requests.

- + \ No newline at end of file diff --git a/getting_started/index.html b/getting_started/index.html index 52c0ccd..74796e4 100644 --- a/getting_started/index.html +++ b/getting_started/index.html @@ -20,7 +20,7 @@
Skip to content

Getting Started

Ways to Install

Docker

You can run URL-to-PNG using Docker with the following command:

bash
docker run --rm -p 3089:3089 ghcr.io/jasonraimondi/url-to-png

Local Development

To run URL-to-PNG locally, follow these steps:

  1. Clone the repository:

    bash
    git clone git@github.com:jasonraimondi/url-to-png.git
     cd url-to-png
  2. Install dependencies:

    bash
    pnpm install
  3. Install Playwright browsers (if needed):

    bash
    pnpm exec playwright install chromium
  4. Start the development server:

    bash
    pnpm dev

The Docker image is also available on DockerHub.

Released under the MIT License.

- + \ No newline at end of file diff --git a/hashmap.json b/hashmap.json index 613909e..c1a0e57 100644 --- a/hashmap.json +++ b/hashmap.json @@ -1 +1 @@ -{"config_index.md":"CqHQGoP7","encryption_index.md":"cUgCAqf2","usage_index.md":"InlL2zEp","metrics_index.md":"B248saWY","index.md":"xV8nFcYK","getting_started_index.md":"BcmIdPSR"} +{"index.md":"xV8nFcYK","getting_started_index.md":"BcmIdPSR","config_index.md":"CqHQGoP7","usage_index.md":"InlL2zEp","encryption_index.md":"cUgCAqf2","metrics_index.md":"B248saWY"} diff --git a/index.html b/index.html index 0d9ebb4..f317c6f 100644 --- a/index.html +++ b/index.html @@ -23,7 +23,7 @@ pnpm install pnpm exec playwright install chromium pnpm dev

Configuration

Read the full config options

Encryption

Learn about encryption

Metrics

Learn about metrics

- + \ No newline at end of file diff --git a/metrics/index.html b/metrics/index.html index 08bf72e..6122da7 100644 --- a/metrics/index.html +++ b/metrics/index.html @@ -29,7 +29,7 @@ "min": 2 } } - + \ No newline at end of file diff --git a/usage/index.html b/usage/index.html index 46bd6b4..2348791 100644 --- a/usage/index.html +++ b/usage/index.html @@ -30,7 +30,7 @@ src="http://localhost:3089?url=https://jasonraimondi.com" alt="Jason Raimondi's personal home page screenshot" /> - + \ No newline at end of file