Shipping

Build, set metadata and deploy Acme Deploys.

This chapter's app is running in your console. Open it with ⌘⌥JCtrl+Shift+J, then try it.
Watch the chapter2:53 · narrated · captions

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.0 (Turbolog)  Compiling app/ … 4 routes, 1 route handler  Bundling 1 client chunk (41.2 kB gzip)✓ Built in 1.8s

text 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.

app/deployments/page.tsx+1tsx
Added: export const metadata = { title: "Deployments" }; // → "Deployments · Acme"

Static hosting

Without route handlers the build is a plain static site. Every route is served by the same index.html, so the host needs one SPA rewrite:

vercel.json+3json
Added: {Added:   "rewrites": [{ "source": "/((?!assets/).*)", "destination": "/index.html" }]Added: }

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.

▼ 10 · Shipping

Open the console

⌘⌥J
CtrlShiftJ

The app renders in DevTools. Then click here and press Enter.

EnterdeployRreset

Open on a desktop

This demo renders in the Chrome DevTools console, which needs a desktop browser.

Quiz

2 questions

Answer every question to complete the chapter.

What does a static host need to serve deep links?

 

Which console setting should be off?