Hapi plugin (v2.x) for connecting to multiple PostgreSQL databases using connection pools. Provides access via server and request objects, supports native pg bindings, and allows attaching queries based on URL params. Uses pg-pool under the hood. Last updated 2017, appears unmaintained (no recent releases).
npm install hapi-postgres-poolNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Registers the plugin with a single PostgreSQL connection and runs a simple query.
Consider migrating to '@hapi/postgresql-connection' or 'knex' with Hapi plugins.
Ensure Hapi version is 17 or newer. For v16, use version 1.x of this plugin.
Always set a 'default' key or ensure the requested key exists in connections.
npm install hapi-postgres-pool
Ensure the key used (e.g., server.pg.mykey) matches one defined in options.connections.