What is the proper way to use the node.js postgresql module?

后端 未结 7 1866
隐瞒了意图╮
隐瞒了意图╮ 2020-11-28 01:15

I am writing a node.js app on Heroku and using the pg module. I can\'t figure out the \"right\" way to get a client object for each request that I need to query the database

7条回答
  •  南笙
    南笙 (楼主)
    2020-11-28 01:20

    As you can see from the documentation both options are valid, so choose whichever you prefer. As you, I would go with the second choice.

提交回复
热议问题