Skip to content
Discussion options

You must be logged in to vote

I added that because, if you import a singleton in Proxy, it won't be the same singleton if imported in a render pass or a Route Handler.

You can however, put it in globalThis, but that's mutable share state across requests, which might be good for a redis connection but, like, if you stub user data there, that it is a big no no 🙅 ~~ I don't think we are talking about the thing. Do you mean like next time the proxy is opened, you want to reuse the connection or query the same pool for a connection?

Proxy is meant to only use nodejs AFAIK though, so that bit should be fine.

Replies: 2 comments 5 replies

Comment options

You must be logged in to vote
5 replies
@bogdanishere
Comment options

@icyJoseph
Comment options

@bogdanishere
Comment options

@icyJoseph
Comment options

@bogdanishere
Comment options

Answer selected by bogdanishere
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants