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.
Full shape
{
"$schema": "https://sproutboat.com/schema.json",
"name": "hello", // 3-32 char lowercase slug; your subdomain
"main": "src/index.js", // entry point, must be under src/
"compatibility_date": "2026-08-26", // YYYY-MM-DD
"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 out of band, read as env.STRIPE_KEY
"outbound": ["api.stripe.com"], // exact hosts fetch() may reach
"durable_objects": { "COUNTER": "Counter" }, // binding -> class name in this file
"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 and subdomain | 3-32 lowercase characters. |
main |
Entry point | Must live under src/. |
compatibility_date |
Runtime pin | YYYY-MM-DD. |
vars |
Compile-time constants | See Vars. |
kv_namespaces |
KV bindings | See KV. |
d1_databases |
D1 bindings | See D1. |
r2_buckets |
R2 bindings | See R2. |
queues |
Queue bindings | See Queues. |
analytics_engine_datasets |
Analytics Engine bindings | Bare name only, no id; unlike KV/D1/R2/queues, these are never provisioned up front — see Storage resources. |
secrets |
Secret bindings | See Secrets. |
outbound |
Egress allowlist | See Outbound fetch. |
durable_objects |
Durable Object bindings | See Durable Objects. |
ratelimiters |
Rate limiter bindings | See Rate limiting. |
triggers.crons |
Cron schedule | See Cron. |
assets |
Static asset serving | See Static assets. |