Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Writes, deploys, and debugs Butterbase serverless functions on the Deno runtime, covering handlers, triggers, database access, and testing.
14% 86%+73 ptsof test cases passed
Passed 19 of 22 test cases with the skill, and 3 of 22 without it.
What is the standard public HTTP endpoint URL pattern for calling a deployed Butterbase HTTP function named process-order on app ID app_12345?
Formats the URL as https://api.butterbase.ai/v1/app_12345/fn/process-order.
3 of 3 safety checks passed
Guide for developing and deploying serverless functions on Butterbase's Deno runtime. Covers handler signatures, trigger types, database access, environment variables, and testing.
Every function exports a single handler function with this signature:
export async function handler(
request: Request,
context: {
db: PostgresClient, // RLS-aware DB client
env: Record<string, string>, // env vars set on the function
user: { id: string } | null, // present for HTTP+auth:required; null for cron
waitUntil: (p: Promise<unknown>) => void, // background work after Response (≤30s)
idempotency: {
claim: (key: string, opts?: { scope?: string; ttlSeconds?: number }) => Promise<boolean>
} // atomic dedup for webhook retries
}
): Promise<Response>
CRITICAL: The handler MUST return new Response() (Web API standard). Do NOT return plain objects.
Correct:
return new Response(JSON.stringify({ message: "ok" }), {
status: 200,
headers: { "Content-Type": "application/json" }
});
Wrong (will fail):
return { status: 200, body: "ok" }; // NOT a Response object!
Next to this one in the catalogue, plus more from the same author.