Skip to content
sproutboat
Esc
navigateopen⌘Jpreview
On this page

How it works

The build and deploy pipeline: from a JavaScript file to a running sprout behind Caddy.

Write the handler

src/index.js: export default { fetch(request) { ... } }. See The handler.

Build

sproutboat build runs Porffor + Zig on your machine and produces a single linux-x86_64 executable (the “sprout”). Your source never leaves the machine.

Deploy

sproutboat deploy uploads the executable plus sproutboat.jsonc-derived sidecars (bindings.json, static assets) to the control plane.

The control plane starts it

The control plane stores the artifact, starts the sprout behind Caddy, and issues a TLS cert on the first request.

Bindings come online

If the deployment declares bindings, the control plane also starts a broker process next to the sprout. The sprout reaches it over loopback for every env.* call.

Cold start and lifetime

Cold start is a process exec plus a socket bind — tens of milliseconds. The process then stays warm and answers in a few milliseconds, and is evicted after about ten minutes idle.

Was this page helpful?