Skip to content

Deploy to Cloudflare

Run Loggo as a read-only demo on Cloudflare Workers.

Updated View as Markdown

Loggo can run as a Cloudflare Worker for a fast, read-only demo using D1. This path doesn’t use Docker at all — you’re deploying from a checkout of the app’s source.

Create a D1 database

In the Cloudflare dashboard, under D1 SQL Database.

Set the binding in wrangler.jsonc

Point d1_databases at the database, and set READ_ONLY=true.

Build and deploy

Run the deployment script to push the Worker.

Prerequisites

  • A Cloudflare account, with Wrangler installed and authenticated (wrangler login)
  • A clone of the Loggo repo

Configure wrangler.jsonc

Set up your wrangler.jsonc to point to your D1 database binding.

wrangler.jsoncjsonc
{
  "name": "loggo-demo",
  "compatibility_date": "2024-12-30",
  "d1_databases": [
    {
      "binding": "DB",
      "database_name": "loggo-db",
      "database_id": "<YOUR_D1_ID>"
    }
  ]
}

Create a D1 database

In the Cloudflare dashboard or via Wrangler, create a database and use its ID above.

Pick a Worker name

Set name to whatever you want the Worker (and its default *.workers.dev URL) to be called.

Build and deploy

Install dependencies and run the build command.

pnpm install
npm run deploy:cloudflare
Navigation

Type to search…

↑↓ navigate↵ selectEsc close