MCPcopy Create free account
hub / github.com/loopbackio/loopback-next / mountExpressRouter

Method mountExpressRouter

packages/rest/src/rest.server.ts:1027–1033  ·  view source on GitHub ↗

* Mount an Express router to expose additional REST endpoints handled * via legacy Express-based stack. * * @param basePath - Path where to mount the router at, e.g. `/` or `/api`. * @param router - The Express router to handle the requests. * @param spec - A partial OpenAPI spec desc

(
    basePath: string,
    router: ExpressRequestHandler,
    spec?: RouterSpec,
  )

Source from the content-addressed store, hash-verified

1025 * document the routes.
1026 */
1027 mountExpressRouter(
1028 basePath: string,
1029 router: ExpressRequestHandler,
1030 spec?: RouterSpec,
1031 ): void {
1032 this._externalRoutes.mountRouter(basePath, router, spec);
1033 }
1034
1035 /**
1036 * Export the OpenAPI spec to the given json or yaml file

Callers 3

mountFullAppMethod · 0.45
mountRoutesOnlyMethod · 0.45

Calls 1

mountRouterMethod · 0.80

Tested by

no test coverage detected