Remove the use of this.app.useGlobalFilters, Warning RendererService is a singleton
See original GitHub issueHello, thank you for this lib,
Actually, each route is binded to the renderer, It would be interesting to to be able to configure the url to handle via next and others via nest. Trying to make an ajax request from browser to server ends in a “Not implemented” response.
Tell me if I am wrong, the renderer service is a singleton as the nest js module specification says. When an incoming request happens, you store the request and the response on the singleton this.service.next(req, res)
. But this request and response might be replaced by an other request…
Issue Analytics
- State:
- Created 5 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Exception filters | NestJS - A progressive Node.js framework
Warning The useGlobalFilters() method does not set up filters for gateways or hybrid applications. Global-scoped filters are used across the whole application, ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@Rmannn I released a new version that exposes the render method on the response object. This should allow for you to do what you were wanting without needing to modify or pass a custom filter. You can see #6 for the details!
Thanks for providing me with this extra information. I have been thinking about this, and while I can provide a way for you to pass in your own filter implementation, what if I exposed a render method that you could call directly? I was thinking something along the lines of this…
The render method on the RenderService could then handle applying a prefix if you have one set, and would optionally accept a fourth argument for the initial props.
I was thinking this may be easier for you to maintain, but if you would prefer a custom filter option I could do that as well.
Also addressing your second point from the initial post, I have verified this is conceptually possible and will be pushing a new version today.