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

Method configure

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

Source from the content-addressed store, hash-verified

43})
44class TestModule {
45 configure(consumer: MiddlewareConsumer) {
46 consumer
47 .apply((req, res, next) => res.send(WILDCARD_VALUE))
48 .forRoutes('tests/*path', 'legacy-wildcard/*')
49 .apply((req, res, next) => res.send(SCOPED_VALUE))
50 .exclude('exclude')
51 .forRoutes(TestController)
52 .apply((req, res, next) => res.send(RETURN_VALUE))
53 .exclude('exclude')
54 .forRoutes('*');
55 }
56}
57
58describe('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