createManagementExpressRouter
Defined in: management-express/src/router.ts:71
Creates an Express router for the Monque Management Surface.
Mount the returned router in the host Express application at the path where operators
should access management endpoints. Management API routes are served by the oRPC OpenAPI
HTTP handler from @monque/management, so the Express adapter follows the same
Management Route Map contract and response DTOs as other Management Adapters.
By default, the router also serves OpenAPI JSON at /openapi.json relative to the mount
path. Disable that route with openApi: false, or configure its path and server URL with
openApi.
Authentication belongs to the host Express app. Mount authentication middleware before
this router, then use context and the framework-neutral authorize hook for
action-grained Management Surface authorization.
Type Parameters
Section titled “Type Parameters”| Type Parameter | Default type | Description |
|---|---|---|
TContext | unknown | Application-specific context exposed to management hooks. |
Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
options | ManagementExpressRouterOptions<TContext> | Monque Management Surface options plus Express adapter options. |
Returns
Section titled “Returns”Router
An Express router that can be mounted with app.use().