TanStackStart
Source:
src/Railway/Website/TanStackStart.ts
Deploy a TanStack Start application to
Railway: the SSR server plus client assets on one Railway.Service.
The build runs through
@alchemy.run/frontend-frameworks/tanstack-start with the
@alchemy.run/frontend-frameworks/tanstack-start/node deploy target —
both must be installed in your project, alongside
@tanstack/react-start (or @tanstack/solid-start) and vite.
Your vite.config.ts needs no adapter wiring: TanStack Start is pure
Vite, so the integration drives the project’s own vite build, forces
the SSR bundle to be self-contained, and wraps its fetch handler as a
Node HTTP server on port 3000.
During alchemy dev the site is TanStack Start’s own Vite dev server
and no cloud resources are created. Alchemy.remote() opts back into
the live Service path.
Creating TanStack Start Sites
Section titled “Creating TanStack Start Sites”Basic TanStack Start App
const site = yield* Railway.Website.TanStackStart("Web", { rootDir: "./app",});Custom Domain
const site = yield* Railway.Website.TanStackStart("Web", { rootDir: "./app", domain: "app.example.com",});Server Configuration
Section titled “Server Configuration”Process Environment
const site = yield* Railway.Website.TanStackStart("Web", { rootDir: "./app", env: { GREETING: "Hello from TanStack Start on Railway!", },});Read An Environment Variable From A Server Function
const getApiBase = createServerFn({ method: "GET" }).handler(() => ({ apiBase: process.env.API_BASE,}));