Skip to content

Portable multi-host deployment

A host adapter builds your app into the shape a platform expects (Node server, serverless functions, edge Worker). A portable framework ships adapters or presets for several hosts, so you can switch without rewriting. That gap is one reason this repo hand-writes host-specific caches.

13 / 14Other featureOne of 7 features that do not affect first paint. Together they are worth 14 of the 28 points.

Labels across 23 frameworks

  • 1st-party8
  • Experimental0
  • Third-party6
  • Manual9
  • of 23

Overview

Quoted text uses the source document's own marks: ✅ means 1st-party, 🧪 means Experimental or Third-party, and 🔧 means Manual.

We tested this feature in 15 Books ports. 15 passed. Each framework's card below shows what its test saw. How we test labels.

Labels record what each framework's documentation says it provides. They are not performance measurements. How the labels are assigned.

How to enable it, by framework

One card per framework, in the same order on every feature page. Where a framework has no built-in support (Manual), a short example shows how to build it yourself.

Next

Third-party1 ptOverview

A stable Adapter API (adapterPath, v16.2+) with verified Vercel and Bun adapters; Cloudflare and Netlify "are working on verified adapters" (deploying). They use their own integrations today: OpenNext for Cloudflare and @netlify/plugin-nextjs for Netlify in this port. output: 'standalone' covers self-hosting, though this port does not set it.

const nextConfig = {
  adapterPath: require.resolve('./my-adapter.js'),
}

Adapted from the adapterPath docs.

Nuxt

1st-party2 ptsOverview

Nitro presets cover every host this repo targets (Node, Vercel, Netlify, Cloudflare). Vercel and Netlify auto-detect their presets; force Workers explicitly:

nitro: {
  preset: isCloudflare ? 'cloudflare_module' : undefined,
},

From this repo's nuxt-books/nuxt.config.ts (nuxt-books-optimized-max branch).

SvelteKit

1st-party2 ptsOverview

Pick an adapter for Node, Vercel, Netlify, Cloudflare, or static output.

const adapter = isCloudflare
  ? cloudflareAdapter
  : process.env.NETLIFY
    ? netlifyAdapter
    : vercelAdapter;
// ...
sveltekit({ adapter: adapter() })

From this repo's svelte-books/vite.config.ts (optimized branch; other options omitted).

SolidStart

Third-party1 ptOverview

Use Nitro v3 presets, or the host-maintained @cloudflare/vite-plugin / @netlify/vite-plugin; all three are documented in the Solid deployment guides (SolidStart v2 deployment plugins; Solid 2 start mode, which also emits its own Node server via start.nodeServer). None of them is maintained by the Solid team, so the cell is scored 🧪, as for React Router's host-maintained integrations.

nitro({
  ...(process.env.CLOUDFLARE || process.env.WORKERS_CI
    ? { preset: "cloudflare_module" }
    : {}),
}),

From this repo's solid-books/vite.config.ts (optimized branch; host image config omitted).

Nitro presets (a separate project, nitrojs/nitro) plus the host-maintained Cloudflare (@cloudflare/vite-plugin) and Netlify (@netlify/vite-plugin-tanstack-start) Vite plugins, which the TanStack hosting guide documents as its official setups; none of the three is published by TanStack. This port implements all three branches; it scores 🧪 by the same rule as React Router and Next.

if (isCloudflare) {
  const { cloudflare } = await import('@cloudflare/vite-plugin')
  plugins.push(cloudflare({ viteEnvironment: { name: 'ssr' } }))
} else if (isNetlify) {
  const netlify = (await import('@netlify/vite-plugin-tanstack-start')).default
  plugins.push(netlify())
} else {
  plugins.push(nitro())
}

From this repo's tanstack-books/vite.config.ts (optimized branch; Nitro rollupConfig option omitted).

The same options, Nitro plus host-maintained plugins (hosting), scored 🧪 as for the React variant; this port implements all three branches with the same Cloudflare / Netlify / Nitro structure in tanstack-solid-books/vite.config.ts (optimized branch).

Code example

The port picks one host plugin at build time: @cloudflare/vite-plugin on Cloudflare, @netlify/vite-plugin-tanstack-start on Netlify, and Nitro everywhere else (Vercel included).

// vite.config.ts
import { defineConfig, type PluginOption } from 'vite'
import { tanstackStart } from '@tanstack/solid-start/plugin/vite'
import viteSolid from '@solidjs/vite-plugin'
import { nitro } from 'nitro/vite'

const isCloudflare = Boolean(process.env.CLOUDFLARE || process.env.WORKERS_CI || process.env.CF_PAGES)
const isNetlify = Boolean(process.env.NETLIFY)

export default defineConfig(async () => {
  const plugins: PluginOption[] = []
  if (isCloudflare) {
    const { cloudflare } = await import('@cloudflare/vite-plugin')
    plugins.push(cloudflare({ viteEnvironment: { name: 'ssr' } }))
  } else if (isNetlify) {
    const netlify = (await import('@netlify/vite-plugin-tanstack-start')).default
    plugins.push(netlify())
  } else {
    plugins.push(nitro())
  }
  plugins.push(tanstackStart(), viteSolid({ ssr: true }))
  return { plugins }
})

Source: TanStack Start: Hosting

Pracht

1st-party2 ptsOverview

Use adapters for Node, Vercel, Netlify, and Cloudflare.

const adapter = isCloudflare
  ? cloudflareAdapter()
  : process.env.NETLIFY
    ? netlifyAdapter()
    : vercelAdapter();
// ...
pracht({ adapter, inlineCss: true })

From this repo's pracht-books/vite.config.ts (optimized branch; other plugins omitted).

Waku

1st-party2 ptsOverview

Use adapters for Node, Vercel, Netlify, and Cloudflare, plus experimental Deno, Bun, and AWS Lambda adapters.

NETLIFY=1 npm run build
CLOUDFLARE=1 npm run build

From the Waku deployment docs.

Ember

Manual0 ptsOverview

Embroider/Vite (guide) plus a community SSR layer (vite-ember-ssr here; in this port only the Node server and the Vercel function server-render, while the Netlify and Cloudflare deploys serve a static SPA shell plus API functions). Official FastBoot 6.0.0 documents Ember CLI builds only; Vite-app support is an open draft PR. No first-party host adapters are documented (FastBoot's deploy page covers a Node app server plus Heroku- and community-maintained AWS integrations, not Vercel, Netlify, or Cloudflare), so nothing to enable.

Code example

From the port: each host gets its own entry file and config, written by hand. Vercel runs the SSR handler as a function (vercel.json rewrites everything to /api). Cloudflare runs a Worker that serves the API and the static SPA shell. Netlify uses netlify.toml redirects plus netlify/functions/api.mjs.

// api/index.js (Vercel: SSR + API)
import '../server/load-env.js';
import { handleNodeRequest } from '../server/handle-request.js';
export default handleNodeRequest;

// workers/index.mjs (Cloudflare: API only, assets from dist/client)
import { bookPayload, catalogPayload, searchParamsFromUrl } from '../server/catalog-api.js';

export default {
  async fetch(request, env) {
    if (env?.POSTGRES_URL) process.env.POSTGRES_URL = env.POSTGRES_URL;
    const url = new URL(request.url);
    if (url.pathname === '/api/catalog') {
      return Response.json(await catalogPayload(searchParamsFromUrl(url.href)));
    }
    // … /api/books/:id …
    return env.ASSETS.fetch(request); // SPA shell (not_found_handling: single-page-application)
  },
};

Astro

1st-party2 ptsOverview

Official adapters for Node (standalone/middleware), Vercel, Netlify, and Cloudflare; the on-demand rendering page names all four as official, and astro add <adapter> installs them. (on-demand-rendering, deploy, node, vercel, netlify, cloudflare)

Code example

The Books port picks an official adapter from the build environment and falls back to Node. Each adapter is installed with astro add <name>.

// astro.config.mjs
import node from '@astrojs/node';
import { defineConfig } from 'astro/config';

async function pickAdapter() {
  if (process.env.NETLIFY) return (await import('@astrojs/netlify')).default();
  if (process.env.CF_PAGES) return (await import('@astrojs/cloudflare')).default();
  if (process.env.VERCEL) return (await import('@astrojs/vercel')).default();
  return node({ mode: 'standalone' });
}

export default defineConfig({
  output: 'server',
  adapter: await pickAdapter(),
});

Source: Astro: @astrojs/node

React Router

Third-party1 ptOverview

React Router-maintained adapters: @react-router/serve and @react-router/express (Node), @react-router/cloudflare, and @react-router/architect (AWS); v8 removed the Cloudflare dev proxy in favor of @cloudflare/vite-plugin. Vercel (@vercel/react-router preset) and Netlify (@netlify/vite-plugin-react-router) are host-maintained, not React Router-owned, so two of the four hosts this repo targets rely on host packages. (adapter, deploying, react-router, react-router, react-router)

Code example

The port picks a host plugin from environment variables at build time. Cloudflare uses @cloudflare/vite-plugin, Netlify uses its own React Router plugin, and Vercel uses the vercelPreset() in react-router.config.ts.

// vite.config.ts
import { reactRouter } from '@react-router/dev/vite'
import { cloudflare } from '@cloudflare/vite-plugin'
import netlifyReactRouter from '@netlify/vite-plugin-react-router'
import { defineConfig, type PluginOption } from 'vite'

const env = process.env
const isCloudflare = !!(env.CLOUDFLARE || env.WORKERS_CI || env.CF_PAGES)
const isNetlify = !!env.NETLIFY && !isCloudflare

const hostPlugins: PluginOption[] = isCloudflare
  ? [cloudflare({ viteEnvironment: { name: 'ssr' } })]
  : isNetlify
    ? [netlifyReactRouter()]
    : []

export default defineConfig({
  plugins: [...hostPlugins, reactRouter()],
})

Source: React Router: Deploying

Qwik City

1st-party2 ptsOverview

qwik add adapters: Node (express, fastify), vercel-edge, netlify-edge, cloudflare-pages, cloudflare-workers. Vercel and Netlify are Edge-runtime adapters only; the docs do not label adapters "first-party" (source is the QwikDev/qwik repo). (deployments, node, vercel-edge, netlify-edge, cloudflare-pages, cloudflare-workers)

Code example

qwik add express (or vercel-edge, netlify-edge, cloudflare-pages) writes an adapter config that extends the base Vite config. The Books port keeps one per host under adapters/.

// adapters/express/vite.config.ts
import { nodeServerAdapter } from '@builder.io/qwik-city/adapters/node-server/vite'
import { extendConfig } from '@builder.io/qwik-city/vite'
import baseConfig from '../../vite.config'

export default extendConfig(baseConfig, () => ({
  build: {
    ssr: true,
    rollupOptions: { input: ['src/entry.express.tsx', '@qwik-city-plan'] },
  },
  plugins: [nodeServerAdapter({ name: 'express' })],
}))

Source: Qwik: Node middleware deployment

Web-standard AngularAppEngine / createRequestHandler is portable, with AngularNodeAppEngine for Node and outputMode: "static". SSR is documented for Node (first-party), Netlify (host-maintained @netlify/angular-runtime, Edge Function) and Cloudflare Workers: the Cloudflare guide scaffolds an SSR Worker through create-cloudflare --framework=angular (AngularAppEngine, ssr.platform: "neutral"), maintained by Cloudflare rather than the Angular team, though the guide page itself does not mention SSR and its automatic-configuration example is assets-only. Vercel lists Angular only as a zero-config frontend framework and no Vercel Angular SSR page was found, so the four hosts this repo targets are not all covered. The deployment page also lists third-party ng deploy builders. This portability judgment is lower confidence. (ssr, angular, angular, frontend, deployment)

Code example

From the port: one AngularAppEngine handler per host, each picked by a build configuration in angular.json. Vercel reuses the Node/Express build behind a function.

// angular-books/src/server.cloudflare.ts (Netlify's server.netlify.ts is the same shape)
import { AngularAppEngine, createRequestHandler } from '@angular/ssr';
// …
const angularAppEngine = new AngularAppEngine();

async function handle(request: Request): Promise<Response> {
  const result = await angularAppEngine.handle(request);
  return result || new Response('Not found', { status: 404 });
}

export const reqHandler = createRequestHandler(handle);
export default { fetch: (request: Request) => handle(request) };

// angular-books/angular.json, build.configurations: one SSR entry per host
// "node":       { "ssr": { "entry": "src/server.ts" } },
// "cloudflare": { "ssr": { "entry": "src/server.cloudflare.ts", "platform": "neutral" } },
// "netlify":    {}  // default "ssr.entry": "src/server.netlify.ts"

// angular-books/api/index.js: Vercel function wrapping the Express build
// handler ??= (await import('../dist/angular-books/server/server.mjs')).reqHandler;

Source: Angular SSR

Marko

1st-party2 ptsOverview

Official adapters for Node, Static and Netlify (Functions or Edge, needs netlify.toml) are on the adapters page. Cloudflare Workers (@marko/run-adapter-cloudflare) is announced as an official adapter in the markojs.com October 2026 newsletter but is not yet on the adapters page. @marko/run-adapter-vercel (npm 0.1.1) is published from the marko-js/run repository by the same maintainers as @marko/run and is documented only in its repo README, not on markojs.com. None is labeled experimental. The marko-books port deploys with all three. (adapters)

Code example

The Books port picks an adapter at build time from an env var. The default Node adapter covers local and container runs; the Netlify, Vercel and Cloudflare adapters build for each host.

// vite.config.ts
import { defineConfig } from "vite";
import marko from "@marko/run/vite";

export default defineConfig(async () => {
  const adapter = process.env.CLOUDFLARE
    ? (await import("@marko/run-adapter-cloudflare")).default()
    : process.env.NETLIFY
      ? (await import("@marko/run-adapter-netlify")).default() // { edge: true } for Edge Functions
      : process.env.VERCEL
        ? (await import("@marko/run-adapter-vercel")).default()
        : (await import("@marko/run/adapter")).default();

  return { plugins: [marko({ adapter })] };
});
NETLIFY=1 marko-run build && netlify deploy --prod --no-build

Source: Marko Run: Adapters

Fresh

Manual0 ptsOverview

Documented: Deno Deploy, deno compile, Docker, and Cloudflare Workers (via @cloudflare/vite-plugin and a hand-written server.js; stability not stated). Node, Vercel, and Netlify are not documented; no official guide was found. (deployment, cloudflare-workers, docker, deno-deploy)

Code example

You write a post-build script that wraps _fresh/server.js in each host's entry shape. This comes from the port: an edge function for Netlify, and a Node handler plus Build Output API config for Vercel.

// scripts/netlify-edge.mjs
import server from "../_fresh/server.js";
export default (request) => server.fetch(request);

// scripts/adapt.mjs (runs after `vite build`; host picked by NETLIFY=1 | VERCEL=1)
if (host === "vercel") {
  await build({ ...common, entryPoints: ["scripts/vercel-handler.mjs"],
    outfile: `${out}/functions/index.func/index.mjs`, platform: "node", target: "node24" });
  await Deno.writeTextFile(`${out}/functions/index.func/.vc-config.json`, JSON.stringify({
    runtime: "nodejs24.x", handler: "index.mjs", launcherType: "Nodejs", supportsResponseStreaming: true,
  }));
  // … copy _fresh/client to static/, write config.json routes
} else if (host === "netlify") {
  await build({ ...common, entryPoints: ["scripts/netlify-edge.mjs"],
    outfile: "netlify/edge-functions/fresh.js", platform: "neutral", external: ["node:*"] });
}

Source: Fresh deployment

Analog

1st-party2 ptsOverview

Nitro presets ship inside Analog's own @analogjs/vite-plugin-nitro. Node is the default output, Vercel and Netlify deploy "with no additional configuration", and Cloudflare Pages needs BUILD_PRESET=cloudflare-pages. (deployment, providers, vite-plugin-nitro)

Code example

Analog builds a Node server by default. Pick another Nitro preset in the Nitro plugin, or with BUILD_PRESET at build time.

// vite.config.ts
import analog from '@analogjs/platform';
import angular from '@analogjs/vite-plugin-angular';
import nitro from '@analogjs/vite-plugin-nitro';
import { defineConfig } from 'vite';

export default defineConfig(() => ({
  plugins: [analog(), angular(), nitro({ preset: 'vercel' })],
}));
# Node (default): node dist/analog/server/index.mjs
BUILD_PRESET=cloudflare-pages npm run build
npx wrangler pages dev ./dist/analog/public

Source: Analog: Deployment providers

Vike

Third-party1 ptOverview

+server gives a built-in server for Node, Bun and Deno self-hosting. Cloudflare uses Cloudflare's @cloudflare/vite-plugin, Netlify uses Netlify's @netlify/vite-plugin, and Vercel uses vite-plugin-vercel; none of the three is a vike package. (self-host, cloudflare, vercel, netlify)

Code example

server: true uses Vike's built-in server on Node, Bun or Deno. For Cloudflare or Vercel, add that host's Vite plugin.

// pages/+config.ts (self-host: node ./dist/server/index.mjs)
export default { server: true }

// vite.config.ts (Cloudflare)
import vike from 'vike/plugin'
import { cloudflare } from '@cloudflare/vite-plugin'

export default {
  plugins: [cloudflare({ viteEnvironment: { name: 'ssr' } }), vike()],
}

// vite.config.ts (Vercel)
import { vercel } from 'vite-plugin-vercel/vite'

export default { plugins: [vike(), vercel()] }

Source: Vike: +server · Vike: Cloudflare · Vike: Vercel

Cloudflare Workers is the only documented host; no Node, Vercel or Netlify target is documented. (hosting)

Code example

The documented build targets Cloudflare Workers through @cloudflare/vite-plugin, and pnpm release deploys it. Staging and production are Wrangler environments. Another host would need an adapter you write yourself.

// vite.config.mts
import { defineConfig } from "vite";
import { redwood } from "rwsdk/vite";
import { cloudflare } from "@cloudflare/vite-plugin";

export default defineConfig({
  plugins: [cloudflare({ viteEnvironment: { name: "worker" } }), redwood()],
});
pnpm release                           # production Worker
CLOUDFLARE_ENV=staging pnpm release    # uses env.staging from wrangler.jsonc

Source: RedwoodSDK: Hosting

Remix 3

Manual0 ptsOverview

The router is a Fetch handler. Node runs it through remix/node-fetch-server, and the docs show Bun, Deno and Cloudflare Worker entries; the static-file and compression middleware are Node-only. No Vercel or Netlify setup is documented, and the Production chapter covers the Node server. (request-handling, production, node-fetch-server)

Code example

The router is a Fetch handler. Node wraps it with createRequestListener; Bun, Deno and Workers call router.fetch directly.

// server.ts (Node)
import * as http from "node:http";
import { createRequestListener } from "remix/node-fetch-server";
import { router } from "./app/router.ts";

http.createServer(createRequestListener(router.fetch)).listen(44100);

// server.ts (Bun)
Bun.serve({ port: 44100, fetch: (request) => router.fetch(request) });

// server.ts (Deno)
Deno.serve({ port: 44100 }, router.fetch);

// worker.ts (Cloudflare)
export default { fetch: (request) => router.fetch(request) } satisfies ExportedHandler;

Source: Remix: Request handling, alternate runtimes

target is "cloudflare" (default, deployed with void deploy), "node", "bun" or "deno". Non-Cloudflare targets build a Hono server in dist/ssr for you to host, and they drop D1, KV, R2, auth, ISR and edge prerendering. output: "static" builds files any static host can serve (the docs name GitHub Pages). No Vercel or Netlify adapter is documented, so this is scored like Remix 3 (Node, Bun, Deno, Cloudflare). (config, nodejs-bun-deno, deployment, ssg)

Code example

Set target in void.config.ts. cloudflare (the default) deploys with void deploy. node, bun and deno build a Hono server in dist/ssr that you host yourself, without ISR, edge prerendering or the D1, KV and R2 bindings. No Vercel or Netlify target is documented.

// void.config.ts
import { defineConfig } from 'void/config'

export default defineConfig({
  target: 'node', // 'cloudflare' | 'node' | 'bun' | 'deno'
})
npx vite build && node dist/ssr/index.js

Source: Void: Config · Void: Node.js, Bun and Deno

target is "cloudflare" (default, deployed with void deploy), "node", "bun" or "deno". Non-Cloudflare targets build a Hono server in dist/ssr for you to host, and they drop D1, KV, R2, auth, ISR and edge prerendering. output: "static" builds files any static host can serve (the docs name GitHub Pages). No Vercel or Netlify adapter is documented, so this is scored like Remix 3 (Node, Bun, Deno, Cloudflare). (config, nodejs-bun-deno, deployment, ssg)

Code example

Set target in void.config.ts. cloudflare (the default) deploys with void deploy. node, bun and deno build a Hono server in dist/ssr that you host yourself, without ISR, edge prerendering or the D1, KV and R2 bindings. No Vercel or Netlify target is documented.

// void.config.ts
import { defineConfig } from 'void/config'

export default defineConfig({
  target: 'node', // 'cloudflare' | 'node' | 'bun' | 'deno'
})
npx vite build && node dist/ssr/index.js

Source: Void: Config · Void: Node.js, Bun and Deno

target is "cloudflare" (default, deployed with void deploy), "node", "bun" or "deno". Non-Cloudflare targets build a Hono server in dist/ssr for you to host, and they drop D1, KV, R2, auth, ISR and edge prerendering. output: "static" builds files any static host can serve (the docs name GitHub Pages). No Vercel or Netlify adapter is documented, so this is scored like Remix 3 (Node, Bun, Deno, Cloudflare). (config, nodejs-bun-deno, deployment, ssg)

Code example

Set target in void.config.ts. cloudflare (the default) deploys with void deploy. node, bun and deno build a Hono server in dist/ssr that you host yourself, without ISR, edge prerendering or the D1, KV and R2 bindings. No Vercel or Netlify target is documented.

// void.config.ts
import { defineConfig } from 'void/config'

export default defineConfig({
  target: 'node', // 'cloudflare' | 'node' | 'bun' | 'deno'
})
npx vite build && node dist/ssr/index.js

Source: Void: Config · Void: Node.js, Bun and Deno

target is "cloudflare" (default, deployed with void deploy), "node", "bun" or "deno". Non-Cloudflare targets build a Hono server in dist/ssr for you to host, and they drop D1, KV, R2, auth, ISR and edge prerendering. output: "static" builds files any static host can serve (the docs name GitHub Pages). No Vercel or Netlify adapter is documented, so this is scored like Remix 3 (Node, Bun, Deno, Cloudflare). (config, nodejs-bun-deno, deployment, ssg)

Code example

Set target in void.config.ts. cloudflare (the default) deploys with void deploy. node, bun and deno build a Hono server in dist/ssr that you host yourself, without ISR, edge prerendering or the D1, KV and R2 bindings. No Vercel or Netlify target is documented.

// void.config.ts
import { defineConfig } from 'void/config'

export default defineConfig({
  target: 'node', // 'cloudflare' | 'node' | 'bun' | 'deno'
})
npx vite build && node dist/ssr/index.js

Source: Void: Config · Void: Node.js, Bun and Deno

Gotchas

  • Presets and adapters change the build output; they don't set up data caching. Most ports here still write their own host-specific cache code (see section 4).