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 Parameters
Section titled “Type Parameters”| Type Parameter |
|---|
A |
E |
R |
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
routes |
Layer<A, E, R> |
Returns
Section titled “Returns”Effect<Context<A |
Mounted>, Without<E>,
| Scope | Graft | Exclude<Without<R>, HttpRouter> |
Only<"Requires" | "GlobalRequires", R>>