Agent skill · software engineering · secondsky
bun-http-server
Use when building HTTP servers with Bun.serve, handling requests/responses, implementing routing, creating REST APIs, or configuring fetch handlers.
Why this skill is useful
Provides specific commands and patterns for building HTTP servers with Bun that the AI wouldn't reliably generate on its own.
What it needs
Requires bun installed locally. About 3k tokens when loaded. Last updated 2026-08-06. 204 stars on the source repository.
What this skill does
Bun HTTP Server Bun has a built-in high-performance HTTP server via Bun.serve(). Quick Start Request Handling Body Parsing Response Types Simple Routing Error Handling Server Options Server Methods Routing with routes (Bun 1.2+) The examples above use the classic fetch(req) handler with manual URL parsing, which still works. As of Bun 1.2, the canonical way to declare route maps is the routes option, with dynamic params available on req.params: Use routes for new code; keep fetch as a fallback for unmatched paths. Static Files CORS Common Errors Error Cause Fix ------- ------- ----- EADDRINUSE Port in use Use different port or kill process Cannot read body Body already consumed Read body once only CORS error Missing headers Add CORS headers 413 Payload Too Large Body exceeds limit Increase maxRequestBodySize When to Load References Load references/tls-config.md when: HTTPS/TLS setup Certificate configuration mTLS authentication Load references/streaming.md when: Server-sent events Streaming responses Chunked transfer encoding
How to use it
Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:
@skills secondsky/bun-http-server