Skip to main content
The Hono API (apps/api) deploys to Render as a Node.js web service. The project includes a render.yaml blueprint that defines the service configuration.

Prerequisites

  • A Render account
  • The folksbase repository connected to Render
  • All external services configured (Neon, Upstash, Supabase, etc.)

Using the Blueprint (render.yaml)

The easiest way to deploy is using Render’s blueprint feature. The render.yaml at the repository root defines everything Render needs:
services:
  - type: web
    name: folksbase-api
    runtime: node
    region: oregon
    plan: starter
    buildCommand: pnpm install && pnpm --filter @folksbase/api build
    startCommand: node apps/api/dist/index.js
    healthCheckPath: /health

1. Connect the Repository

  1. Go to dashboard.render.com
  2. Click New → Blueprint
  3. Connect your GitHub repository
  4. Render will detect render.yaml and create the service

2. Set Environment Variables

The blueprint declares all required env vars with sync: false, meaning you need to set their values manually in the Render dashboard. Go to your service’s Environment tab and add:
VariableDescription
DATABASE_URLNeon Postgres connection string
REDIS_URLUpstash Redis REST URL
REDIS_REST_TOKENUpstash Redis token
SUPABASE_URLSupabase project URL
SUPABASE_PUBLISHABLE_KEYSupabase anon key
SUPABASE_SECRET_KEYSupabase service role key
SUPABASE_WEBHOOK_SECRETSupabase webhook secret
BLOB_READ_WRITE_TOKENVercel Blob token
INNGEST_EVENT_KEYInngest event key
INNGEST_SIGNING_KEYInngest signing key
ANTHROPIC_API_KEYAnthropic API key
RESEND_API_KEYResend API key
ENCRYPTION_KEY64-char hex string for AES-256-GCM
APP_URLThe Render service URL
FRONTEND_URLThe Vercel frontend URL(s) for CORS
The blueprint pre-sets these with fixed values:
  • NODE_VERSION=24
  • PNPM_VERSION=10.32.1
  • RESEND_FROM_EMAIL=noreply@folksbase.dev
  • PORT=3001

3. Deploy

Push to main or trigger a manual deploy from the Render dashboard. The build command installs dependencies and compiles the API with tsup.

Health Check

The API exposes a /health endpoint that Render uses to verify the service is running. It checks both the database (Neon) and cache (Redis) connections:
// Healthy
{ "status": "ok", "checks": { "db": "ok", "redis": "ok" } }

// Degraded (503)
{ "status": "degraded", "checks": { "db": "ok", "redis": "error" } }
If the health check fails, Render will restart the service automatically.

Build Process

The build command runs two steps:
  1. pnpm install — installs all monorepo dependencies
  2. pnpm --filter @folksbase/api build — compiles the API using tsup
The start command runs the compiled output directly: node apps/api/dist/index.js.

Why the HTTP Driver?

The database package uses Neon’s HTTP driver (drizzle-orm/neon-http) instead of the WebSocket driver. This is intentional — Render’s infrastructure makes persistent WebSocket connections to Neon unreliable. The HTTP driver works over standard HTTPS requests, which is simpler and more compatible. Do not switch to the WebSocket driver without testing on Render first.

Rollback

  1. Go to your service’s Events tab in the Render dashboard
  2. Find the last successful deploy
  3. Click Rollback to redeploy that version