1.3.0 • Published 7 months ago
@voiceflow/nestjs-timeout v1.3.0
NestJS Timeout
A NestJS interceptor that will error a request after a timeout is exceeded.
Installation
yarn add @voiceflow/nestjs-timeout
Usage
import { Controller } from '@nestjs/common';
import { TimeoutInterceptor } from '@voiceflow/nestjs-timeout';
@Controller()
// Timeout after 30 seconds
@UseInterceptors(new TimeoutInterceptor(30 * 1000))
export class MyController {
/* ... */
}