rxjs - Reactive programming with NestJs - Stack Overflow

admin2025-04-24  4

It is possible to implement Reactive programming in NestJs (Like WebFlux in Java/springboot) !?

For example When we run the code :

@Controller('/example')
export class AccountController {
  @Get()
  findAll(): Observable<number> {
    return from([1, 2, 3, 4]);
  }
}

It shows the result 4, and the Official Documentation of NestJs () said that : Nest will automatically subscribe to the source underneath and take the last emitted value (once the stream is completed).

I ask if there is a way to implement Reactive programming ?

转载请注明原文地址:http://anycun.com/QandA/1745461705a90762.html