method IRouterApi.group
IRouterApi.group(
prefix: string,
configure: (router: IRouterApi) => void
): void

Creates a route group: routes registered inside the callback share the prefix and any group middleware.

Parameters

prefix: string

Path prefix for every route in the group

configure: (router: IRouterApi) => void

Receives a router scoped to the prefix

Return Type

void

Usage

import { type IRouterApi } from "common/src/index.ts";