Skip to content
Back to Deployment

Deploying TanStack Start Apps

Full-stack React framework from TanStack with file-based routing and SSR, deploy to Vercel, Netlify, Cloudflare.

PlatformsAdvanced

Why

TanStack Start brings TanStack Router's type-safe routing to a full-stack framework with SSR and server functions. It leverages Vinxi (Vite-based) for builds with adapter-based deploys.

Platform-as-a-Service adoption grew 24% in 2024 as teams shift from VM management to git-push deploys. the cloud infrastructure market reached $330B in 2024, growing 22% year-over-year (Synergy Research), and PaaS layers capture the majority of new workloads.

When

Use TanStack Start for type-safe full-stack React apps. Choose when TanStack Router's 100% type safety is valued over ecosystem maturity.

How

1. Build — vinxi build produces .output/ 2. Vercel — @tanstack/start/vercel adapter 3. Netlify — @tanstack/start/netlify adapter 4. Cloudflare — @tanstack/start/cloudflare adapter 5. Node — node .output/server/index.mjs 6. Server functions — createServerFn for RPC

Example

// app.config.ts import { defineConfig } from "@tanstack/start/config"; export default defineConfig({ vite: { plugins: [] } }); // src/routes/index.tsx — type-safe route import { createFileRoute } from "@tanstack/router"; export const Route = createFileRoute("/")({ component: () => <h1>Home</h1> }); // Deploy: vinxi build && vercel --prod

Common Problems

  • ⚠Adapter not configured — defaults to Node, fails on edge platforms
  • ⚠Route types not generated — run tanstack router generate before build
  • ⚠Configuration drift between environments — use infrastructure-as-code (Terraform/Pulumi) to keep dev/staging/prod identical

Best Practices

  • ✓Use createServerFn for all server logic — gives type-safe RPC between client and server
  • ✓Run tanstack router generate in prebuild — ensures route types are fresh
  • ✓Set up health checks and graceful shutdown — handle SIGTERM to drain in-flight requests before exit

FAQ