MCPcopy Index your code
hub / github.com/loopbackio/loopback-next / bindRoute

Method bindRoute

packages/rest/src/rest.server.ts:747–754  ·  view source on GitHub ↗
(r: RouteEntry)

Source from the content-addressed store, hash-verified

745 }
746
747 private bindRoute(r: RouteEntry) {
748 const namespace = RestBindings.ROUTES;
749 const encodedPath = encodeURIComponent(r.path).replace(/\./g, '%2E');
750 return this.bind(`${namespace}.${r.verb} ${encodedPath}`)
751 .to(r)
752 .tag(RestTags.REST_ROUTE)
753 .tag({[RestTags.ROUTE_VERB]: r.verb, [RestTags.ROUTE_PATH]: r.path});
754 }
755
756 /**
757 * Register a route redirecting callers to a different URL.

Callers 2

_createHttpHandlerMethod · 0.95
routeMethod · 0.95

Calls 3

tagMethod · 0.80
toMethod · 0.80
bindMethod · 0.45

Tested by

no test coverage detected