Getting Started

Deploy your own waitlist backend on Cloudflare Workers in under 5 minutes.

Prerequisites

Before you begin, make sure you have:

Quick Start

Create your project

Terminal
npx create-0list my-waitlist
cd my-waitlist

Install dependencies

Terminal
bun install

Create D1 database

Terminal
bunx wrangler d1 create 0list-db

Copy the database_id from the output and update your wrangler.toml.

Run migrations

Terminal
# Local development
bun run db:migrate:local

# Production
bun run db:migrate:prod

Start development

Terminal
bun run dev

Your API is now running at http://localhost:8787 and admin dashboard at http://localhost:5173.

Deployment

Deploy to Cloudflare Workers with a single command:

Terminal
bun run deploy

This will:

  1. Build the API and admin dashboard
  2. Deploy the Worker to your Cloudflare account
  3. Set up the D1 database binding
Custom Domain

Add a custom domain in the Cloudflare dashboard under Workers & Pages → your worker → Settings → Domains & Routes.

Creating Your First Waitlist

Once deployed, visit your admin dashboard and create a new waitlist:

Click “New Waitlist” in the dashboard
Enter a name and unique slug (e.g., beta-launch)
Configure double opt-in settings (recommended)
Add any custom fields you need

Then integrate with your frontend:

signup.ts
const response = await fetch(
"https://your-worker.workers.dev/api/waitlists/beta-launch/signup",
{
  method: "POST",
  headers: { "Content-Type": "application/json" },
  body: JSON.stringify({
    email: "[email protected]",
    name: "Jane Doe"
  })
}
);

const { position } = await response.json();
// position: 42

Next Steps