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

Method configure

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

Source from the content-addressed store, hash-verified

228 })
229 class TestModule {
230 configure(consumer: MiddlewareConsumer) {
231 consumer
232 .apply((req, res, next) => res.end(INCLUDED_VALUE))
233 .forRoutes({ path: 'tests/included', method: RequestMethod.POST })
234 .apply((req, res, next) => res.end(REQ_URL_VALUE))
235 .forRoutes('req/url/*')
236 .apply((req, res, next) => res.end(WILDCARD_VALUE))
237 .forRoutes(
238 'express_style_wildcard/*',
239 'tests/*path',
240 'legacy_style_wildcard/(.*)',
241 )
242 .apply((req, res, next) => res.end(QUERY_VALUE))
243 .forRoutes('query')
244 .apply((req, res, next) => next())
245 .forRoutes(TestQueryController)
246 .apply((req, res, next) => res.end(SCOPED_VALUE))
247 .forRoutes(TestController)
248 .apply((req, res, next) => res.end(RETURN_VALUE))
249 .exclude({ path: QUERY_VALUE, method: -1 as any })
250 .forRoutes('*');
251 }
252 }
253
254 beforeEach(async () => {

Callers

nothing calls this directly

Calls 5

forRoutesMethod · 0.65
excludeMethod · 0.65
applyMethod · 0.65
endMethod · 0.65
nextFunction · 0.50

Tested by

no test coverage detected