简体   繁体   中英

krakenjs and node postgres

How do I set up node-postgres using krakenjs? I want to take advantage of node-postgres's connection pooling which requires the client and done parameters. I guess I could set them using global variables, but I'd rather pass them around as an object. Is there a good way to achieve this?

You can set up the pool in onconfig in the kraken (1.0) configuration, or in global based on nconf (kraken 0.7).

Then to pass it around -- you can attach it to the app (kraken 0.7), or you can add it to the configuration in onconfig .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM