Creates and verifies a connected pg.Pool using the provided database configuration.
Executes a SELECT NOW() query to confirm the connection is healthy before returning.
The pool and every connection it opens get an 'error' listener, so a connection that the database
drops does not crash the process with an unhandled 'error' event.
Creates and verifies a connected
pg.Poolusing the provided database configuration. Executes aSELECT NOW()query to confirm the connection is healthy before returning.The pool and every connection it opens get an
'error'listener, so a connection that the database drops does not crash the process with an unhandled'error'event.