跳转到内容

mount

此内容尚不支持你的语言。

function mount<A, E, R>(
routes: Layer<A, E, R>,
): Effect<
Context<A | Mounted>,
Without<E>,
| Scope
| Graft
| Exclude<Without<R>, HttpRouter>
| Only<"Requires" | "GlobalRequires", R>
>

Defined in: Http.ts:112

Build ordinary HttpRouter layers and serve their routes until the calling plugin unloads. Requests and response streams stop before layer resources close. Route handlers receive the mounting plugin’s services and the current request scope.

Type Parameter
A
E
R
Parameter Type
routes Layer<A, E, R>

Effect<Context<A | Mounted>, Without<E>, | Scope | Graft | Exclude<Without<R>, HttpRouter> | Only<"Requires" | "GlobalRequires", R>>