CLI utility that blocks until a PostgreSQL database is ready to accept connections. Version 1.1.2 is the latest stable release. It retries connecting with configurable interval and timeout. Minimal dependencies, ships TypeScript types. Use in CI/CD pipelines or scripts that depend on a database being available before proceeding.
npm install await-pg-cliNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows how to import and use the default export to wait for a PostgreSQL database.
Specify values in milliseconds (e.g., 1000 for 1 second, 30000 for 30 seconds).
Wrap in try-catch and handle the error, e.g., log and exit.
Use ESM import statement.
Run 'npm install await-pg-cli'.
Use 'import cli from 'await-pg-cli''.