Recommended setup in long running node server
Hi all!
I have a node.js based backend running on railway serving a frontend,
and I'm confused regarding the driver choice and whether and where to use pooling.
My code thus far has been the following
However, the docs warn against double pooling, and I heard that server-side pooling might be better than client-side, especially when running replicas and the like.
I tried to use Client instead of Pool but it makes my backend crash on launch already.
Can you give me pointers towards a reliable production setup for a bog-standard fe/be webapp?
I have a node.js based backend running on railway serving a frontend,
and I'm confused regarding the driver choice and whether and where to use pooling.
My code thus far has been the following
However, the docs warn against double pooling, and I heard that server-side pooling might be better than client-side, especially when running replicas and the like.
I tried to use Client instead of Pool but it makes my backend crash on launch already.
Can you give me pointers towards a reliable production setup for a bog-standard fe/be webapp?