Luvabase logoLuvabase Docs

Environment Reference

Luvabase injects runtime environment metadata into the LUVABASE_ENV variable when your app is deployed as a pod. See Cloudflare's environment variables documentation for more details on Worker environment variables and local vars.

import { env } from "cloudflare:workers"

export default {
  async fetch(request: Request) {
    return Response.json({
      podId: env.LUVABASE_ENV.podId,
    })
  },
}

LUVABASE_ENV has this shape:

type LUVABASE_ENV = {
  podId: string
  installedAt: string
  updatedAt: string
}

LUVABASE_ENV is only provided by Luvabase in deployed apps. During local development, you can mock it by adding it to vars in wrangler.jsonc:

wrangler.jsonc
{
  //...
  "vars": {
    "LUVABASE_ENV": {
      "podId": "dev-pod",
      "installedAt": "2026-01-01T00:00:00.000Z",
      "updatedAt": "2026-01-01T00:00:00.000Z",
    },
  },
}