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

Function makeHandler

packages/platform/node/test/HttpStaticServer.test.ts:21–31  ·  view source on GitHub ↗
(
  root: string,
  options: Omit<Parameters<typeof HttpStaticServer.make>[0], "root"> = {}
)

Source from the content-addressed store, hash-verified

19)
20
21const makeHandler = (
22 root: string,
23 options: Omit<Parameters<typeof HttpStaticServer.make>[0], "root"> = {}
24) =>
25 HttpRouter.toWebHandler(
26 HttpStaticServer.layer({
27 root,
28 ...options
29 }).pipe(Layer.provideMerge(staticFilesLayer)),
30 { disableLogger: true }
31 )
32
33const withStaticFiles = async (
34 run: (context: {

Callers 1

withStaticFilesFunction · 0.70

Calls 1

pipeMethod · 0.65

Tested by

no test coverage detected