Getting Started
Deploy your own waitlist backend on Cloudflare Workers in under 5 minutes.
Prerequisites
Before you begin, make sure you have:
- A Cloudflare account (free tier works)
- Bun or Node.js 18+ installed
- Wrangler CLI installed and authenticated
- (Optional) Resend account for confirmation emails
Quick Start
Create your project
npx create-0list my-waitlist
cd my-waitlist Install dependencies
bun install Create D1 database
bunx wrangler d1 create 0list-db Copy the database_id from the output and update your wrangler.toml.
Run migrations
# Local development
bun run db:migrate:local
# Production
bun run db:migrate:prod Start development
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:
bun run deploy This will:
- Build the API and admin dashboard
- Deploy the Worker to your Cloudflare account
- 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:
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: "user@example.com",
name: "Jane Doe"
})
}
);
const { position } = await response.json();
// position: 42