I\'m using knex with pg.
I have a project similar as following.
dbClient.js
const dbClient = require(\'knex\')({ client: \'pg\', connection:
You probably don't usually need to explicitly call knex.destroy() – this is implied by the documentation itself saying (emphasis mine):
knex.destroy()
If you ever need to explicitly teardown the connection pool, you may use knex.destroy([callback]).
knex.destroy([callback])