{"id":28245060,"url":"https://github.com/zen-crab/pgwait","last_synced_at":"2025-06-14T11:30:31.753Z","repository":{"id":45561766,"uuid":"344999008","full_name":"zen-crab/pgwait","owner":"zen-crab","description":"Pauses execution of a Node.js application until a PostgreSQL connection becomes available.","archived":false,"fork":false,"pushed_at":"2025-05-19T06:32:15.000Z","size":146,"stargazers_count":2,"open_issues_count":3,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-05-24T00:04:26.856Z","etag":null,"topics":["postgresql","typescript","wait"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zen-crab.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2021-03-06T03:49:17.000Z","updated_at":"2023-09-13T00:09:36.000Z","dependencies_parsed_at":"2025-04-28T08:41:27.145Z","dependency_job_id":null,"html_url":"https://github.com/zen-crab/pgwait","commit_stats":null,"previous_names":["zen-crab/pgwait","sbmelvin/pgwait"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/zen-crab/pgwait","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zen-crab%2Fpgwait","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zen-crab%2Fpgwait/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zen-crab%2Fpgwait/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zen-crab%2Fpgwait/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zen-crab","download_url":"https://codeload.github.com/zen-crab/pgwait/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zen-crab%2Fpgwait/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259808101,"owners_count":22914570,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["postgresql","typescript","wait"],"created_at":"2025-05-19T08:14:51.976Z","updated_at":"2025-06-14T11:30:31.744Z","avatar_url":"https://github.com/zen-crab.png","language":"TypeScript","readme":"# [pgwait](https://github.com/sbmelvin/pgwait/)\n[![NPM version][npm-version-image]][npm-url]\n[![NPM downloads][npm-downloads-image]][npm-downloads-url]\n[![MIT License][license-image]][license-url]\n\nPauses execution of a Node.js application until a PostgreSQL connection becomes available.\n\n## Installing\n```bash\nnpm i pgwait\n```\n\n## Usage\n```TypeScript\nimport pgwait from 'pgwait'\n\nawait pgwait({\n    host: 'localhost',      // PostgreSQL hostname or IP address.\n    port: 5432,             // PostgreSQL port number.\n    database: 'pgwait',     // PostgreSQL database. If omitted, PostgreSQL defaults to the username.\n    user: 'postgres',       // PostgreSQL username.\n    password: 'postgres',   // PostgreSQL password if the server requires authentication.\n    retry: 2                // The retry interval in seconds.\n})\n```\nNote: `pgwait` uses `node-postgres` under the hood. PostgreSQL environment variables will be used for undefined connection options.  \n\n## License\n\nCopyright (c) 2021 Stephen B. Melvin Jr (\u003cstephenbmelvin@gmail.com\u003e)\n\nPermission is hereby granted, free of charge, to any person obtaining\na copy of this software and associated documentation files (the\n'Software'), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to\nthe following conditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\nIN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\nCLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\nTORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\nSOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n[license-image]: https://img.shields.io/badge/license-MIT-blue.svg?style=flat\n[license-url]: LICENSE\n\n[npm-url]: https://npmjs.org/package/pgwait\n[npm-version-image]: https://img.shields.io/npm/v/pgwait.svg?style=flat\n\n[npm-downloads-image]: https://img.shields.io/npm/dm/pgwait.svg?style=flat\n[npm-downloads-url]: https://npmcharts.com/compare/pgwait?minimal=true\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzen-crab%2Fpgwait","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzen-crab%2Fpgwait","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzen-crab%2Fpgwait/lists"}