Skip to content
sproutboat
Esc
↑↓navigate↵open⌘Jpreview
On this page

sproutboat.jsonc

The full configuration file: name, entry point, bindings, vars, secrets, triggers, and assets.

sproutboat.jsonc is JSONC: comments and trailing commas are allowed. Unknown fields are rejected.

Full shape

{
  "$schema": "https://sproutboat.com/schema.json",
  "name": "hello",                      // lowercase slug, up to 32 characters; part of your hostname
  "main": "src/index.js",               // entry point under src/; .ts works too
  "compatibility_date": "2026-09-28",   // YYYY-MM-DD; picks the handler signature

  "vars": { "APP_URL": "https://hello.example.com" },   // baked in, read as env.APP_URL

  "kv_namespaces": ["SESSIONS"],        // bare name, or { "binding": "SESSIONS", "id": "kv_..." }
  "d1_databases": ["DB"],
  "r2_buckets": ["MEDIA"],
  "queues": ["JOBS"],
  "analytics_engine_datasets": ["EVENTS"],   // bare name only; no id

  "secrets": ["STRIPE_KEY"],            // value set with `sproutboat secrets put`, read as env.STRIPE_KEY

  "services": [{ "binding": "PEER", "service": "quote-service" }],   // another of your projects
  "durable_objects": { "COUNTER": "Counter" },   // binding -> class name in the entry file
  "version_metadata": "VERSION",                 // env.VERSION.id, .tag, .timestamp

  "ratelimiters": [                              // env.API.limit({ key }) -> { success, resetAt }
    { "binding": "API", "limit": 100, "period": 60 }   // 100 per 60s, per key
  ],

  "triggers": { "crons": ["0 * * * *"] },        // 5-field UTC cron

  "assets": {
    "directory": "public",                       // files published with the artifact
    "binding": "ASSETS",                          // env.ASSETS.fetch(request)
    "not_found_handling": "single-page-application",
    "run_sprout_first": ["/api/*"]                // paths the handler sees before the asset server
  }
}

Field reference

Field Purpose Details
name Project slug Lowercase letters, digits and hyphens, up to 32 characters. The project is served at <name>.<username>.<platform-domain>.
main Entry point A .js or .ts file under src/.
compatibility_date Runtime pin YYYY-MM-DD. From 2026-09-28 the handler receives (request, env, ctx); see The handler.
vars Build-time constants See Vars.
kv_namespaces KV bindings See KV.
d1_databases D1 bindings See D1-compatible SQLite.
r2_buckets R2 bindings See R2-compatible object storage.
queues Queue bindings See Queues.
analytics_engine_datasets Analytics Engine bindings See Analytics Engine.
secrets Secret bindings See Secrets.
services Service bindings See Service bindings.
durable_objects Durable Object bindings See Durable Objects.
version_metadata Version metadata binding See Version metadata.
ratelimiters Rate limiter bindings See Rate limiting.
triggers.crons Cron schedule See Cron.
assets Static asset serving See Static assets.

Was this page helpful?