Server runtime helpers.
Define a named group of related route registrations.
Route groups are flattened by defineRoutes, so createServer still receives a regular route list while app code can keep feature route wiring colocated.
const todoRoutes = defineRouteGroup<AppContext>({ name: "todos", routes: [ { contract: listTodos, handle: async ({ ctx }) => ctx.todos.list() }, ]}); Copy
const todoRoutes = defineRouteGroup<AppContext>({ name: "todos", routes: [ { contract: listTodos, handle: async ({ ctx }) => ctx.todos.list() }, ]});
Server runtime helpers.