Skip to main content
Capabilities

Static Websites

Serve an HTML, CSS, and JavaScript site from a Dynamic App.

An app is a directory with a package.json and a server entrypoint. A static site is the same directory plus a public/ folder and a handler that serves it. View the complete example.

Deploy the directory and open /apps/static-website/:

// Deploy the site directory. Its package.json and src/index.ts serve public/.
await deployApp({
	appId: "static-website",
	source: new URL("../fixtures/app/", import.meta.url),
});

Directories that contain only static files are rejected. Every app needs a package.json and an entrypoint that default-exports a fetch handler.