[]previous and next page

Deploy your app

Pick an adapter, build, and run what it wrote.

For agentsUpdated

An adapter decides what dusk build writes. You choose one in vite.config.ts.

Compare adapter capabilities, configuration and build output.

Choose a deployment target

vite.config.tsts
import { dusk } from "@shadow-js/dusk/vite";
import { node } from "@shadow-js/dusk/node";
import { defineConfig } from "vite";

export default defineConfig({
  plugins: [dusk({ adapter: node() })],
});
Target Adapter Run
Node.js node() node dist/node/server.mjs
Bun bun() bun dist/bun/server.mjs
Deno deno() deno run --allow-read --allow-env --allow-net dist/deno/server.mjs
Cloudflare Workers cloudflare({ name: "my-app" }) npx wrangler deploy -c dist/cloudflare/wrangler.toml
Vercel vercel() vercel deploy --prebuilt
Netlify netlify() cd dist/netlify && npx netlify deploy --prod
Static host staticSite() upload dist/static/

Each adapter is imported from @shadow-js/dusk/<name>; staticSite comes from @shadow-js/dusk/static. Build with npx dusk build first. Every adapter shares the same request handler, so your route code stays the same across targets.

A static export has no request handler, so server functions, middleware and API routes need one of the other targets.

Next: security by default. Configuration, headers, redirects and platform limits are in Deploy and Configuration.