Edge deploy in 3 seconds: my Cloudflare Workers workflow
Posted by Garuda Vahana · 2025-08-13
From git push to globally deployed in 3 seconds. Wrangler + GitHub Actions + D1. Here's the minimal setup that handles 10M requests/month on the free tier. https://github.com/cloudflare/workers-sdk
// wrangler.toml — minimal Workers setup
// name = "my-api"
// main = "src/index.ts"
// compatibility_date = "2025-01-01"
// [[d1_databases]]
// binding = "DB"
// database_name = "production"
import { Hono } from 'hono';
type Env = { DB: D1Database };
const app = new Hono<{ Bindings: Env }>();
app.get('/api/items', async (c) => {
const { results } = await c.env.DB.prepare(
'SELECT * FROM items ORDER BY created_at DESC LIMIT 20'
).all();
return c.json(results);
});
export default app;