Guides
A collection of code samples and walkthroughs for performing common tasks with Bun.
Featured Guides
Use Tanstack Start with Bun
Learn how to build applications with TanStack Start and Bun
Use Next.js with Bun
Build Next.js applications using Bun as the runtime
Build a frontend using Vite and Bun
Set up Vite with Bun for fast frontend development
Write a simple HTTP server
Create your first HTTP server with Bun.serve
Build a simple WebSocket server
Implement real-time communication with WebSockets
Install TypeScript declarations for Bun
Get TypeScript support and autocompletion for Bun APIs
Categories
Browse guides by category:
- Deployment - Deploy Bun applications to various platforms
- Ecosystem & Frameworks - Integrate Bun with popular frameworks
- HTTP & Networking - Build HTTP servers and handle network requests
- WebSocket - Real-time communication with WebSockets
- File System - Read and write files
- Processes - Spawn and manage child processes
- Binary Data - Convert between binary data formats
- Streams - Work with ReadableStreams and Node.js streams
- Test Runner - Write and run tests with Bun
- Package Manager - Manage dependencies with Bun
- Utilities - Common utility functions and helpers