NestJS · Middle · Question 38 of 75
How do you push live updates to the browser over HTTP in Nest?
- 1Nest can't stream responses
- 2With
@Get()and a loop - ✓Correct answer: With
@Sse()on a handler that returns an Observable of message events
Explanation
For two-way communication use WebSocket gateways (@WebSocketGateway() with @SubscribeMessage()).