🍞

Bun Server Guide

Verified

by Community

Learn to use Bun's built-in HTTP server, file I/O, SQLite, and bundler for building high-performance backend applications. Covers Bun.serve(), hot reloading, native SQLite, test runner, and migrating from Node.js.

bunserverperformancesqlitejavascript-runtime

Bun Server Guide

A guide to building high-performance backend applications using Bun's native server APIs and built-in tools.

Usage

Ask about Bun server setup, native APIs, SQLite, or migration from Node.js.

Examples

  • "Create an HTTP server with Bun.serve()"
  • "How do I use Bun's native SQLite?"
  • "Migrate an Express app to Bun"

Guidelines

  • Use Bun.serve() for the fastest HTTP server performance
  • Leverage Bun's built-in SQLite for simple data persistence
  • Use Bun.file() for efficient file I/O operations
  • Take advantage of Bun's native test runner
  • Check Node.js API compatibility before migrating modules