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

Method configure

integration/hello-world/e2e/exclude-middleware.spec.ts:70–86  ·  view source on GitHub ↗
(consumer: MiddlewareConsumer)

Source from the content-addressed store, hash-verified

68})
69class TestModule {
70 configure(consumer: MiddlewareConsumer) {
71 consumer
72 .apply((req, res, next) => res.send(MIDDLEWARE_VALUE))
73 .exclude(
74 'test',
75 'overview/:id',
76 'wildcard/*',
77 'legacy-wildcard/(.*)',
78 'splat-wildcard/*splat',
79 {
80 path: 'middleware',
81 method: RequestMethod.POST,
82 },
83 )
84 .exclude('multiple/exclude')
85 .forRoutes('*path');
86 }
87}
88
89describe('Exclude middleware', () => {

Callers

nothing calls this directly

Calls 4

forRoutesMethod · 0.65
excludeMethod · 0.65
applyMethod · 0.65
sendMethod · 0.45

Tested by

no test coverage detected