b
LearnBun.org
Part I free · Updated May 2026

Bun for Beginners.

Learn Bun by building a real notes app — from an empty folder to a deployed server. Part I is free now. Parts II and III are on the way.

index.ts
// Your first Bun server
const server = Bun.serve({
  port: 3000,
  routes: {
    "/": () =>
      new Response("Hello, Bun!"),
  },
});

// $ bun run index.ts
console.log(`Listening on ${server.url}`);
1
install command
4
built-in tools
0
extra config
Notify me

Get notified when Part II ships.

Part I is free, forever. Sign up and I'll send an email when the paid Part II and III are ready.

Unsubscribe anytime.

The four pillars

What you'll build

Start with an empty folder. End with a working web app, persisted to a database, running on the internet. Every step is real code.

01 · Run
$ bun run

Install Bun, write your first script, see it run.

02 · Serve
Bun.serve

A web server, routes, layouts, and forms.

03 · Persist
bun:sqlite

Notes that survive a restart, stored in SQLite.

04 · Deploy
systemd

A real domain, HTTPS, and logs you can read.

About this book

Why another book?

Most JavaScript tutorials teach you Node, then bolt on a bundler, a test runner, a TypeScript transpiler, a process manager. That's a lot to install before you've written a line of code.

Bun does all of those jobs out of the box. This book teaches you Bun the way it's meant to be used — start with the built-ins, add a dependency only when you actually need it, and finish with a real app you can show people.

Each chapter is short and runnable. You build one thing per chapter. By the end, you've shipped a notes app to a real server.

17
chapters
1
notes app, built end-to-end
0
Node experience required