Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如何使用 krakenjs 设置 node-postgres?我想利用需要clientanddone参数的 node-postgres 的连接池。我想我可以使用全局变量来设置它们,但我宁愿将它们作为对象传递。有没有好的方法来实现这一目标?
client
done
您可以在 kraken (1.0) 配置中设置池onconfig,或者在基于nconf(kraken 0.7) 的全局中设置池。
onconfig
nconf
然后传递它——你可以将它附加到应用程序(kraken 0.7),或者你可以将它添加到onconfig.