bun-cloudflare-workers

Solid

This skill should be used when the user asks about "Cloudflare Workers with Bun", "deploying Bun to Workers", "wrangler with Bun", "edge deployment", "Bun to Cloudflare", or building and deploying applications to Cloudflare Workers using Bun.

DevOps & Infrastructure 162 stars 25 forks Updated 2 weeks ago MIT

Install

View on GitHub

Quality Score: 88/100

Stars 20%
74
Recency 20%
90
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
80
License 10%
100
Description 5%
100

Skill Content

# Bun Cloudflare Workers Build and deploy Cloudflare Workers using Bun for development. ## Quick Start ```bash # Create new Workers project bunx create-cloudflare my-worker cd my-worker # Install dependencies bun install # Development bun run dev # Deploy bun run deploy ``` ## Project Setup ### package.json ```json { "scripts": { "dev": "wrangler dev", "deploy": "wrangler deploy", "build": "bun build src/index.ts --outdir=dist --target=browser" }, "devDependencies": { "@cloudflare/workers-types": "^4.20250906.0", "wrangler": "^4.54.0" } } ``` ### wrangler.toml ```toml name = "my-worker" main = "src/index.ts" compatibility_date = "2024-01-01" # Use Bun for local dev [dev] local_protocol = "http" # Bindings [[kv_namespaces]] binding = "KV" id = "xxx" [[d1_databases]] binding = "DB" database_name = "my-db" database_id = "xxx" ``` ## Basic Worker ```typescript // src/index.ts export default { async fetch(request: Request, env: Env, ctx: ExecutionContext): Promise<Response> { const url = new URL(request.url); if (url.pathname === "/") { return new Response("Hello from Cloudflare Workers!"); } if (url.pathname === "/api/data") { return Response.json({ message: "Hello" }); } return new Response("Not Found", { status: 404 }); }, }; interface Env { KV: KVNamespace; DB: D1Database; } ``` ## Using Hono ```typescript // src/index.ts import { Hono } from "hono"; type Bindings = { KV: KVNamespa...

Details

Author
secondsky
Repository
secondsky/claude-skills
Created
6 months ago
Last Updated
2 weeks ago
Language
TypeScript
License
MIT

Integrates with

Similar Skills

Semantically similar based on skill content — not just same category