MCPcopy Create free account
hub / github.com/Effect-TS/effect / constructor

Method constructor

packages/platform/src/internal/httpRouter.ts:171–186  ·  view source on GitHub ↗
(
    readonly routes: Chunk.Chunk<Router.Route<E, R>>,
    readonly mounts: Chunk.Chunk<
      readonly [
        prefix: string,
        httpApp: App.Default<E, R>,
        options?: { readonly includePrefix?: boolean | undefined } | undefined
      ]
    >
  )

Source from the content-addressed store, hash-verified

169> implements Router.HttpRouter<E, R> {
170 readonly [TypeId]: Router.TypeId
171 constructor(
172 readonly routes: Chunk.Chunk<Router.Route<E, R>>,
173 readonly mounts: Chunk.Chunk<
174 readonly [
175 prefix: string,
176 httpApp: App.Default<E, R>,
177 options?: { readonly includePrefix?: boolean | undefined } | undefined
178 ]
179 >
180 ) {
181 super()
182 this[TypeId] = TypeId
183 this.httpApp = toHttpApp(this).pipe(
184 Effect.flatMap((app) => this.httpApp = app as any)
185 ) as any
186 }
187 private httpApp: Effect.Effect<
188 ServerResponse.HttpServerResponse,
189 E | Error.RouteNotFound,

Callers

nothing calls this directly

Calls 2

toHttpAppFunction · 0.85
pipeMethod · 0.65

Tested by

no test coverage detected