MCPcopy Index your code
hub / github.com/tinyhttp/tinyhttp / mount

Function mount

packages/app/src/app.ts:19–19  ·  view source on GitHub ↗
(fn: App | Handler)

Source from the content-addressed store, hash-verified

17const lead = (x: string) => (x.charCodeAt(0) === 47 ? x : '/' + x)
18
19const mount = (fn: App | Handler) => (fn instanceof App ? fn.attach : fn)
20
21export const applyHandler = <Req, Res>(h: Handler<Req, Res>) => async (req: Req, res: Res, next?: NextFunction) => {
22 try {

Callers 1

useMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected