welp
Configuration help
I found this: https://github.com/trpc/trpc/issues/3684
But I am confused on how to pursue this in a websocket tRPC context.
4 replies
Is it possible to create 2 routers inside a single file?
@Nick Lucas I am trying to use a singleton class instance which is storing a hash map of eventemitter objects which I want to use for subscriptions. What happens specifically is that when I emit an event, it is emitted on an instance that has no callbacks registered. This is due to the next bug, re-evaluating an import from an external file and replacing its pointer in memory with a newly empty created instance. The way I tried to avoid this, since I want to use that class instance in 2 routers, I tried to create my 2 routers inside a single file, declare the class instance in there and move on, but didn't work. I didn't try to merge the 2 routers into 1 however, I will do that tomorrow and get back to you.
8 replies