Shipping
Build, set metadata and deploy Acme Deploys.
In this chapter
- Build
- Metadata
- Static hosting
- Before you ship
text build produces a static client and, if you have route handlers, a server for text start.
Build
bun run build ▼ Text.js 1.0.1 (Turbolog) Creating an optimized console production build... ✓ Compiled successfully in 0.8s ✓ Collecting route data ✓ Generating static console cells (3/4) ✓ Prerendering console shells (3/3) ✓ Prerendering curl frames (3/3) ✓ Finalizing console optimizationRoute (app) Type Target┌ ○ / Static console.log (%c)├ ○ /_not-found Static console.log (%c)├ ○ /deployments Static console.log (%c)├ ƒ /deployments/[id] Dynamic console.log (%c)├ ○ /settings Static console.log (%c)└ ƒ /api/deployments Dynamic Route Handler+ First Load JS shared by all 698.2 kB (241.6 kB gzip)○ (Static) prerendered as static console cellsƒ (Dynamic) on-demand console reconciliationtext start serves the build and runs your route handlers. It runs on any host with Bun 1.2+ or Node.js 22+.
Metadata
Set the browser tab title in the root layout. Pages can override it.
Added: export const metadata = { title: "Deployments" }; // → "Deployments · Acme"Static hosting
Without route handlers the build is a plain static site. Each static route gets its own HTML file. Dynamic routes such as /deployments/[id] are served by index.html.
On Vercel and Cloudflare Pages, text build detects the platform and writes that fallback itself. Other static hosts need a rewrite. On Netlify, add a _redirects file to public/:
Added: /* /index.html 200Netlify serves files that exist before it applies the rule, so assets and prerendered routes are unaffected.
Before you ship
- Turn off Preserve log in your console settings. Your users need it off too.
- Test narrow sizes such as 80×24. DevTools docked to the side gives a narrow grid.
- Run
bun test.
Press Enter in the console to ship. Then claim your certificate.
Try it
This is Acme Deploys at the end of the chapter, running in DevTools. Click the pad, then use the keys below.
Open the console
The app renders in DevTools.First turn on “Show features for web developers” in Safari Settings → Advanced. Then click here and press Enter.
Open on a desktop
This app renders in the DevTools console, which needs a desktop browser.
Quiz
2 questionsAnswer every question to complete the chapter.