Working examples

Small routes that expose one full-stack idea at a time.

Example 02 / Server functions

A server boundary you can call like a function.

This snapshot reads Node-only runtime data inside createServerFn(), then returns it to the route loader through a typed contract.

Live server response
Request ID
b790d22a
Runtime
Node.js 22.19.0
Executed at
2026-08-03T08:10:24.506Z
  • Typed RPC
  • Server-only APIs
  • Route invalidation

No endpoint ceremony

TanStack Start generates the transport layer while the function remains directly callable from loaders and components.