My desktop application uses Postgres authentication and keeps permanent connection to Postgres, so every query is executed by specific user. All queries send by a single instance of the application have to be executed in the same Postgres session. A session can last up to several hours and for most of the time it can be idle.
I would like to get the same functionality using pg-promise. After some tests with express/pg-promise I'm a bit confused as I cannot find a way to do that. I'm new to web development so please an easy answer for a beginner.