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

Function makeHandler

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

Source from the content-addressed store, hash-verified

26)
27
28const makeHandler = (
29 root: string,
30 options: Omit<Parameters<typeof HttpStaticServer.layer>[0], "root"> = {}
31) =>
32 HttpRouter.toWebHandler(
33 HttpStaticServer.layer({
34 root,
35 ...options
36 }).pipe(Layer.provideMerge(staticFilesLayer)),
37 { disableLogger: true }
38 )
39
40const withStaticFiles = async (
41 run: (context: {

Callers 1

withStaticFilesFunction · 0.70

Calls 2

pipeMethod · 0.65
layerMethod · 0.45

Tested by

no test coverage detected