Closed lroal closed 3 years ago
do a module.exports
of your pool, then It can be used by other files I guess?
closing because is not a bug but feel free to reply 🙂
That is not going to solve it. I want to share the pool between all spawned child processes. Typically we create a node process for each CPU. Consider this a feature request if it is does not exist.
Pgbouncer typically solves this. But it would be great if node-pool had this built-in.
Is there anyway to share the pool between multiple nodejs processes running in the same cluster ? Something like this (not sure if this works, it is old): https://www.npmjs.com/package/node-pool-cluster