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

Method static

packages/rest/src/rest.server.ts:794–796  ·  view source on GitHub ↗

* Mount static assets to the REST server. * See https://expressjs.com/en/4x/api.html#express.static * @param path - The path(s) to serve the asset. * See examples at https://expressjs.com/en/4x/api.html#path-examples * @param rootDir - The root directory from which to serve static assets

(path: PathParams, rootDir: string, options?: ServeStaticOptions)

Source from the content-addressed store, hash-verified

792 * @param options - Options for serve-static
793 */
794 static(path: PathParams, rootDir: string, options?: ServeStaticOptions) {
795 this._externalRoutes.registerAssets(path, rootDir, options);
796 }
797
798 /**
799 * Set the OpenAPI specification that defines the REST API schema for this

Callers 15

constructorMethod · 0.45
constructorMethod · 0.45
registerAssetsMethod · 0.45
constructorMethod · 0.45
constructorMethod · 0.45
constructorMethod · 0.45
constructorMethod · 0.45
constructorMethod · 0.45
constructorMethod · 0.45

Calls 1

registerAssetsMethod · 0.80

Tested by 2

constructorMethod · 0.36