pmb-postgres is a Postgres database provider for the PMB framework, version 0.0.6. It provides a lightweight integration layer for connecting PMB applications to PostgreSQL databases. As a very early-stage package with no release cadence, it offers minimal abstraction over node-postgres. Its key differentiators are its tight coupling with PMB's service architecture and small API surface. Uses pg (node-postgres) internally.
npm install pmb-postgresNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Demonstrates creating a Postgres service with configuration and executing a simple query.
Pin exact version in package.json and review changelog before upgrading.
Use 'connectionString' instead of 'url' or 'uri'.
Wrap db.query calls in try-catch or implement custom retry logic.
Use import statement or enable ES modules in your project. Alternatively, use dynamic import: const { createPostgresService } = await import('pmb-postgres');Ensure PostgreSQL is running. Update connectionString to use the correct host (e.g., '127.0.0.1' or valid hostname).
Modify pg_hba.conf to allow connections from your client IP with appropriate authentication method (e.g., md5, trust). Then reload PostgreSQL.