MCPcopy
hub / github.com/nestjs/nest / setGlobalPrefix

Method setGlobalPrefix

packages/core/nest-application.ts:379–391  ·  view source on GitHub ↗
(prefix: string, options?: GlobalPrefixOptions)

Source from the content-addressed store, hash-verified

377 }
378
379 public setGlobalPrefix(prefix: string, options?: GlobalPrefixOptions): this {
380 this.config.setGlobalPrefix(prefix);
381 if (options) {
382 const exclude = options?.exclude
383 ? mapToExcludeRoute(options.exclude)
384 : [];
385 this.config.setGlobalPrefixOptions({
386 ...options,
387 exclude,
388 });
389 }
390 return this;
391 }
392
393 public useWebSocketAdapter(adapter: WebSocketAdapter): this {
394 if (this.isWsModuleRegistered) {

Callers

nothing calls this directly

Calls 3

mapToExcludeRouteFunction · 0.90
setGlobalPrefixMethod · 0.65

Tested by

no test coverage detected