Skip to main content
Bun home page
Search...
⌘K
Install Bun
Search...
Navigation
Streams
Convert a ReadableStream to an ArrayBuffer
Runtime
Package Manager
Bundler
Test Runner
Guides
Reference
Blog
Feedback
Overview
Guides
Runtime & Debugging
TypeScript types
Re-map import paths
VS Code debugger
Web debugger
Heap snapshots
Build-time constants
Define constants
GitHub Actions
Codesign on macOS
Utilities
Detect Bun
Get Bun version
Hash password
Generate UUID
Base64 encoding
Gzip compression
DEFLATE compression
Escape HTML
Deep equality
Sleep
File URL to path
Path to file URL
Find executable path
import.meta.dir
import.meta.file
import.meta.path
Check entrypoint
Get entrypoint path
Deployment
Deploy on Railway
Deploy on Render
Ecosystem & Frameworks
Astro with Bun
Discord.js with Bun
Docker with Bun
Drizzle with Bun
EdgeDB with Bun
Elysia with Bun
Express with Bun
Hono with Bun
Mongoose with Bun
Neon Drizzle with Bun
Neon Serverless Postgres with Bun
Next.js with Bun
Nuxt with Bun
PM2 with Bun
Prisma ORM with Bun
Prisma Postgres with Bun
Qwik with Bun
React with Bun
Remix with Bun
Sentry with Bun
SolidStart with Bun
SSR React with Bun
StricJS with Bun
SvelteKit with Bun
systemd with Bun
Vite with Bun
HTTP & Networking
HTTP Server with Bun
Simple HTTP Server with Bun
Fetch with Bun
Hot reload an HTTP server
Start a cluster of HTTP servers
Configure TLS
Proxy HTTP requests using fetch()
Stream file response
Upload files via HTTP using FormData
Fetch with unix domain sockets
Stream with iterators
Stream with Node.js
WebSocket
Simple server
Pub-sub server
Contextual data
Enable compression
Processes & System
Spawn child process
Read stdout
Read stderr
Parse command-line arguments
Read from stdin
Spawn a child process and communicate using IPC
Listen for CTRL+C
OS signals
Process uptime
Run shell command
Set time zone
Set env variables
Read env variables
Package Manager
Add a dependency
Add a dev dependency
Add an optional dependency
Add a peer dependency
Add a Git dependency