Server runtime helpers.
Define and flatten route registrations with strong type inference.
Pass route definitions and route groups here before createServer(...). Group entries are flattened so downstream tooling receives one route list.
createServer(...)
const routes = defineRoutes<AppContext>([ { contract: listPosts, handle: async ({ ctx }) => ctx.posts.list() },]); Copy
const routes = defineRoutes<AppContext>([ { contract: listPosts, handle: async ({ ctx }) => ctx.posts.list() },]);
Server runtime helpers.